--- a/Allura/allura/templates/jinja_master/lib.html
+++ b/Allura/allura/templates/jinja_master/lib.html
@@ -130,6 +130,7 @@
<li><a href="#md_ex_img{{id}}">Images</a></li>
<li><a href="#md_ex_escapes{{id}}">Escapes</a></li>
<li><a href="#md_ex_moreheaders{{id}}">More Headers</a></li>
+ <li><a href="#md_ex_toc{{id}}">Table of Contents</a></li>
<li><a href="#md_ex_code{{id}}">Code Highlighting</a></li>
<li><a href="#md_ex_includes{{id}}">Includes</a></li>
<li><a href="#md_ex_neighborhood_notes{{id}}">Neighborhood Notifications</a></li>
@@ -534,6 +535,24 @@
</div>
+<div class="markdown_syntax_section hidden_in_modal md_ex_toc{{id}}">
+<h2 id="md_ex_toc{{id}}">Table of Contents</h2>
+<p>You can display a list of links to jump to headers in a document. Sub-headers will be nested.</p>
+<div class="codehilite"><pre>[TOC]
+
+# Section 1
+## Sub-section 1
+# Section 2</pre></div>
+
+<p>Output:</p>
+{{g.markdown.convert('''[TOC]
+
+# Section 1
+## Sub-section 1
+# Section 2''')}}
+</div>
+
+
<div class="markdown_syntax_section hidden_in_modal md_ex_code{{id}}">
<h2 id="md_ex_code{{id}}">Code Highlighting</h2>
<p>The Code highlighting used in the newforge is based on (http://www.freewisdom.org/projects/python-markdown/CodeHilite). It follows the same syntax as regular Markdown code blocks, except that there are two ways to tell the highlighter what language to use for the code block.</p>