commonmark/cmark

Parsing of inline HTML declaration is stricter than spec

xiaq opened this issue · 0 comments

xiaq commented

According to the spec (https://spec.commonmark.org/0.30/#declaration), <!A> should be a valid declaration. But cmark requires there to be a space:

$ echo 'a <!A>' | cmark
<p>a &lt;!A&gt;</p>
$ echo 'a <!A >' | cmark
<p>a <!-- raw HTML omitted --></p>

commonmark.js has the same behavior (https://spec.commonmark.org/dingus/?text=a%20%3C!A%3E%0A%0Aa%20%3C!A%20%3E).