mity / md4c

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

List item mark followed with EOF #139

Closed mity closed 3 years ago

mity commented 3 years ago

Compare these:

$ printf '*' | md2html
<p>*</p>

$ printf '*\n' | md2html
<ul>
<li></li>
</ul>

Ditto for ordered lists:

$ printf '1.' | md2html
<p>1.</p>

$ printf '1.\n' | md2html
<ol>
<li></li>
</ol>

Yet, they should have the same output, because end-of-file implies an implicit end-of-line.