preservim / vim-markdown

Markdown Vim Mode
4.68k stars 521 forks source link

Double line in a comment breaks syntax highlighting #579

Open carlosalberto opened 2 years ago

carlosalberto commented 2 years ago

I have a document and within a comment section I have a "--", which breaks the syntax highlighting for the ENTIRE document:

<!-- Ofending line RIGHT BELOW -->
<!-- Re-generate TOC with `markdown-toc --no-first-h1 -i` -->

Text here is NOT recognized anymore, considered a huge comment section.

If markdown-toc --no-first-h1 -i becomes markdown-toc -no-first-h1 -i then all work as expected.

This is on the master branch.

alerque commented 2 years ago

At least at first bluff this does look like a bug. Contributions welcome. I didn't immediately find where this is being parsed and won't likely have much time to dig into it soon but I'm happy to facilitate PRs if anybody jumps in.