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

Error occurs when uncompleted markdown text is parsed #31

Closed simonmysun closed 5 years ago

simonmysun commented 7 years ago

I didn't find a similar issue but this one fixes my situation.

If there is only one '#' being parsed, the original code will fail.

medfreeman commented 5 years ago

fixed in https://github.com/medfreeman/markdown-it-toc-and-anchor/commit/00ddf0b40a450abfa5b4b6daac9a922860ec4eca