-
-
Notifications
You must be signed in to change notification settings - Fork 224
Closed
Description
Consider these three example snippets:
__!_!__
__!x!__
**!*!**
And the results they give in the commonmark dingus:
__!_!__
!x!
!*!
I think commonmark.js has a bug here, because the __ in __! is a left-flanking delimiter run. It is followed by a unicode punctuation character (!), and it is preceded by the beginning of the line (which is treated as whitespace).
More generally, it seems like, if the second example parses successfully, then the first one must also parse. The spec says that underscores are allowed in the middle of underscore-delimited strong emphasis (it wouldn't be allowed at the beginning or end of the emphasis span, but it's not).
This example was found by differential fuzzing with pulldown-cmark. Corresponding issue: pulldown-cmark/pulldown-cmark#660
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels