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

Trailing whitespace when inserting TOC #30

Closed leotrs closed 8 years ago

leotrs commented 8 years ago

Is there a reason why whitespace is introduced at the end of every TOC line?

link: there are two spaces before the newline.

amyreese commented 8 years ago

This forces a hard newline (<br/>) in the Markdown parser, and is intentional.

leotrs commented 8 years ago

That actually makes a lot of sense. The problem was that my text editor deletes trailing whitespace on every line at every save, and it was screwing up some tests.