commonmark/cmark

HTML comments do not follow the 0.30 spec

Opened this issue · 0 comments

cmark 0.30.3 does not follow the spec for Example 625 and Example 626.

Example input to cmark --unsafe:

foo <!-- not a comment -- two hyphens -->

foo <!--> foo -->

foo <!-- foo--->

Expected output:

<p>foo &lt;!-- not a comment -- two hyphens --&gt;</p>
<p>foo &lt;!--&gt; foo --&gt;</p>
<p>foo &lt;!-- foo---&gt;</p>

Actual output:

<p>foo <!-- not a comment -- two hyphens --></p>
<p>foo <!--> foo --&gt;</p>
<p>foo &lt;!-- foo---&gt;</p>