docgen: support markdown headings too

This commit is contained in:
Araq 2019-01-11 15:06:45 +01:00 • committed by Andreas Rumpf
commit ee7f2d97cc
4 changed files with 57 additions and 11 deletions

View file

@ -1238,7 +1238,12 @@ function main() {
</select>
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<li><a class="reference" id="this-is-now-a-header_toc" href="#this-is-now-a-header">This is now a header</a></li>
<ul class="simple"><li><a class="reference" id="this-is-now-a-header-next-header_toc" href="#this-is-now-a-header-next-header">Next header</a></li>
<ul class="simple"><li><a class="reference" id="next-header-and-so-on_toc" href="#next-header-and-so-on">And so on</a></li>
</ul></ul><li><a class="reference" id="more-headers_toc" href="#more-headers">More headers</a></li>
<ul class="simple"><li><a class="reference" id="more-headers-up-to-level-6_toc" href="#more-headers-up-to-level-6">Up to level 6</a></li>
</ul><li>
<a class="reference reference-toplevel" href="#7" id="57">Types</a>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#SomeType"
@ -1271,7 +1276,12 @@ function main() {
</div>
<div class="nine columns" id="content">
<div id="tocRoot"></div>
<p class="module-desc"></p>
<p class="module-desc">
<h1><a class="toc-backref" id="this-is-now-a-header" href="#this-is-now-a-header">This is now a header</a></h1>
<h2><a class="toc-backref" id="this-is-now-a-header-next-header" href="#this-is-now-a-header-next-header">Next header</a></h2>
<h3><a class="toc-backref" id="next-header-and-so-on" href="#next-header-and-so-on">And so on</a></h3>
<h1><a class="toc-backref" id="more-headers" href="#more-headers">More headers</a></h1>
<h6><a class="toc-backref" id="more-headers-up-to-level-6" href="#more-headers-up-to-level-6">Up to level 6</a></h6></p>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">

View file

@ -1220,7 +1220,7 @@ function main() {
<div class="document" id="documentId">
<div class="container">
<h1 class="title">Index</h1>
Modules: <a href="subdir/subdir_b/utils.html">subdir/subdir_b/utils</a>, <a href="testproject.html">testproject</a>.<br/><p /><h2>API symbols</h2>
Modules: <a href="testproject.html">testproject</a>, <a href="utils.html">utils</a>.<br/><p /><h2>API symbols</h2>
<dl><dt><a name="A" href="#A"><span>A:</span></a></dt><dd><ul class="simple">
<li><a class="reference external"
data-doc-search-tag="testproject: A" href="testproject.html#A">testproject: A</a></li>

View file

@ -1,3 +1,16 @@
##[
# This is now a header
## Next header
### And so on
# More headers
###### Up to level 6
]##
type
SomeType* = enum