medfreeman / markdown-it-toc-and-anchor

markdown-it plugin to add a toc and anchor links in headings
MIT License
60 stars 35 forks source link

Nested anchor #46

Closed watagashi closed 5 years ago

watagashi commented 6 years ago

input

# [test](http://google.com)
## text [test](http://google.com)
## **text**
## *text*
## ~~text~~

output

<ul class="markdownIt-TOC">
<li><a href="#test">test</a>
<ul>
<li>[text <a href="http://google.com">test</a>](#text-test)</li>
<li><a href="#text"><strong>text</strong></a></li>
<li><a href="#text-2"><em>text</em></a></li>
<li><a href="#text-3"><s>text</s></a></li>
</ul>

expected output

<ul class="markdownIt-TOC">
<li><a href="#test">test</a>
<ul>
<li><a href="#text-test">text test</a></li>
<li><a href="#text"><strong>text</strong></a></li>
<li><a href="#text-2"><em>text</em></a></li>
<li><a href="#text-3"><s>text</s></a></li>
</ul>
coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 6c2841bf77f1f733bdbb3f90a906e9e9f84cb77f on watagashi:nested-anchor into b1b88557578c4121584a606a33e7edce7d6f099d on medfreeman:master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 6c2841bf77f1f733bdbb3f90a906e9e9f84cb77f on watagashi:nested-anchor into b1b88557578c4121584a606a33e7edce7d6f099d on medfreeman:master.