mity / md4c

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

Fix code span wrongly identified as code block #205

Closed step- closed 5 months ago

step- commented 5 months ago

Close https://github.com/mity/md4c/issues/201.

What happens in #201 is that MD4C identifies the first "```" as the start of a fenced code block.

Threfore it renders "aaa" and " ```" as code block lines, then it automatically closes the fenced code block at EOF.

DETAILS

Commonmark spec 0.30 about fenced code blocks.

A fenced code block begins with a code fence, preceded by up to three spaces of indentation.[1] A fenced code block may interrupt a paragraph, and does not require a blank line either before or after.[2]

mity commented 5 months ago

Race condition :-) Fixed few minutes ago myself.