amyreese / markdown-pp

Preprocessor for Markdown files to generate a table of contents and other documentation needs
MIT License
309 stars 68 forks source link

--- Generates a heading in the TOC #54

Closed valzi closed 6 years ago

valzi commented 6 years ago

Whenever I use a horizontal rule in Markdown, MarkdownPP generates a heading in the TOC.

A horizontal rule in Markdown: ---

The result after using MarkdownPP:

<a name=""></a>

9.6\. 
9.6\. ------
amyreese commented 6 years ago

This could be fixed with a modification to the regex, or by verifying that the preceding line is empty.

valzi commented 6 years ago

Verifying that the preceding line is empty had no effect. I always leave the preceding line empty. I did just check to ensure though.

I don't know what modification to regex you mean (and wouldn't know how to do that anyway.)