mity / md4c

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

Improve strikethrough around double quotes #242

Closed step- closed 4 months ago

step- commented 4 months ago

Please, is there something you could do to improve parsing strikethrough markdown? Consider the following test subject. Clearly, I don't mean to strike through any words in either paragraph but while the first paragraph is done as I mean, the second one strikes through some words apparently attracted by the double quotes.

Test subject

copy ~user1/file to ~user2/file

copy "~user1/file" to "~user2/file"

Output of md2html --fstrikethrough

<p>copy ~user1/file to ~user2/file</p>
<p>copy &quot;<del>user1/file&quot; to &quot;</del>user2/file&quot;</p>
mity commented 4 months ago

Yeah, it would improve compatibility with other emphasis spans as well as with GFM.