cmarkit icon indicating copy to clipboard operation
cmarkit copied to clipboard

Incorrect parsing of code span

Open dbuenzli opened this issue 1 year ago • 1 comments

> printf '\```ext``' | cmark             
<p>`<code>ext</code></p>
> printf '\```ext``' | cmarkit html   
<p>```ext``</p>

dbuenzli avatar Mar 13 '24 11:03 dbuenzli

The escaped backtick logic is wrong, somehow Cmarkit takes an initial escape in a backtick run as disabling the whole run.

We should either change the tokenization strategy or match against count - 1 when the run starts with an escape and textify the escaped backtick. Unclear in my mind right now but we need to be careful about this.

dbuenzli avatar Mar 13 '24 11:03 dbuenzli