Fails with full stop and multiple spaces using pandoc
When using pandoc to generate html output, md-to-toc fails to match the generated id if the heading contains a full stop or more than one consecutive space:
Source markdown:
# Multiple spaces.
Pandoc output:
<h1 id="multiple-spaces.">Multiple spaces.</h1>
md-to-toc output:
- [Multiple spaces.](#multiple---spaces)
Pandoc keeps the full stop while md-to-toc strips it out.
Pandoc collapses multiple spaces into a single dash while md-to-toc converts every space to a dash.
md-to-toc is designed to replicate GitHub's algorithm for determining anchor strings and GitHub may well handle these cases differently to pandoc. Thought I'd bring it to your attention anyway.
Aside from these two issues, which were trivial to work around, the script worked very well and saved me a lot of time. Thanks!
Thanks for the great bug report! I'll make sure to fix this as soon as I can :)