Repository navigation
feat!: flank emphasis by the CJK-friendly amendments - #30
Merged
Merged
Conversation
`这是**重点。**然后` now holds a Strong: every emphasis-like delimiter run (`*`, `_`, `~~`, `==`) decides left- and right-flanking by the markdown-cjk-friendly amendments to CommonMark, so a run beside a CJK character or CJK punctuation is not blocked the way ASCII punctuation blocks it. CommonMark and GFM conformance is unchanged; the amendments' own test inputs render as micromark-extension-cjk-friendly renders them. BREAKING CHANGE: text beside CJK characters that read as literal delimiters may now read as emphasis, strikethrough, or highlight. Decision 0018 supersedes 0015. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iScek4mjbrpjjJQd5YxJC
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Plimeor · project thread
Before:
这是**重点。**然后parses as plain text, because CommonMark's flanking rules treat。like ASCII punctuation and Chinese puts no space after it.After: it holds a
Strongaround重点。. Every emphasis-like run (*,_,~~,==) decides left- and right-flanking by the markdown-cjk-friendly amendments (spec at5b17173, Unicode 18 ranges), as micromark-extension-cjk-friendly does.How: a new
unicode_cjktable (copied from the amendments'ranges.md) and a two-sided classification indelimiter_flanking_within, which owns flanking for all four marks; a variation selector before a run reads as the char it follows. The amendments' own test inputs (123 cases) are checked intests/fixtures/syntax_decisions/cjk_friendly_emphasis.caseswith HTML verified against micromark-extension-cjk-friendly 2.0.2. The CommonMark/GFM bench stays at 2113/2113 and no golden moved. One regression test flips:a*。*bnow forms emphasis, as the reference renders it.Docs:
inline-syntaxgains "CJK-friendly emphasis flanking" and "CommonMark inlines" names the exception; decision 0018 supersedes 0015; the plan is archived atdocs/archive/2026-10-18-cjk-friendly-emphasis/.Breaking: text beside CJK characters that read as literal delimiters may now read as emphasis, strikethrough, or highlight.
Generated by Claude Code