mity / md4c

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

Indented code after empty list item is treated as paragraph #190

Closed dbuenzli closed 5 months ago

dbuenzli commented 1 year ago
> md2html --version             
0.4.8
> printf "- \n\n    a" | md2html
<ul>
<li></li>
</ul>
<p>a</p>
> printf "- \n\n    a" | cmark  
<ul>
<li></li>
</ul>
<pre><code>a
</code></pre>

Somehow the code must still be interpreting the line with the indentation of the list item. It should not. The list is over because a list item can only start with a single blank line (see list item rule 3 and this example).