mity / md4c

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

Odd indented code block can break paragraph #189

Closed dbuenzli closed 5 months ago

dbuenzli commented 1 year ago

and the spec says indented code blocks don't interrupt paragraphs

> md2html --version
0.4.8

> printf 'a\n    ```\nb' | md2html
<p>a</p>
<pre><code>b
</code></pre>

> printf 'a\n    ```\nb' | cmark  
<p>a

b



Likely something fishy happening because the indented text looks like a fence: for example md2html passes [this spec test](https://spec.commonmark.org/0.30/#example-113), and it is correct if you only have two backticks or less.
mity commented 5 months ago

Same as #201, should be fixed.