mity / md4c

C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.
MIT License
755 stars 138 forks source link

HTML declarations are not recognized without a whitespace #216

Closed mity closed 5 months ago

mity commented 5 months ago

The input

x <!A>

renders as

<p>x &lt;!A&gt;</p>

instead of correct

<p>x <!A></p>
mity commented 5 months ago

Ah, this is a residue of 0.29 spec which required a whitespace before the closer of the tag.

Compare https://spec.commonmark.org/0.29/#declaration and https://spec.commonmark.org/0.30/#declaration