Surrogate & grapheme merged

Combining marks/ZWJ wrongly treated as punctuation in emphasis (wenmode)

Fix emphasis flanking for Unicode marks and format characters

wenmode · lepture/wenmode

Symptom

wenmode's is_punctuation function treats Unicode combining marks (Mn category) and format characters (Cf/ZWJ) as punctuation per the CommonMark spec, incorrectly suppressing valid emphasis around CJK text with diacritics or ZWJ sequences.

Minimal repro
Markdown text using emphasis (* or _) adjacent to a combining mark or ZWJ character; emphasis fails to render because combining marks are classified as punctuation.
Fix

Exclude Unicode General Categories Mn, Mc, Cf from the punctuation classification; add ASCII fast-path to avoid performance regression.

Merged PR → #wenmode-emphasis-flanking-marks
← all 93 entries