Model CommonMark's emphasis matching, and escape the delimiter that only closes #25
Reference in New Issue
Block a user
Delete Branch "tick-2e5"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Flanking alone let two round-trip breaks through, both confirmed against cmark 0.31.2 and markdown-it 14.1.0: the multiple-of-3 rule took the em out of
un*a**b*****c**istic, and a text delimiter that could only close stole the spelling around it (un*a* b*istic,~~a~~ b~~).The emitter now runs CommonMark's process_emphasis over the runs it wrote and carries a pair the matching hands to another delimiter; a delimiter run in text escapes wherever CommonMark could open or close with it, which keeps every delimiter the emitter did not write out of that matching. Canonical form gains a backslash where a run only closes.
2e5's own content lands with it: combined-document fixtures and the gate's collision property.
A brute-force emit-then-parse run over 143k generated paragraphs against both reference parsers: 4919 breaks before, 0 after.