Skip to content

feat!: flank emphasis by the CJK-friendly amendments - #30

Merged
plimeor merged 1 commit into
mainfrom
claude/project-thread-uuu92j
Oct 18, 2026
Merged

plimeor merged 1 commit into
mainfrom
claude/project-thread-uuu92j

Conversation

@plimeor

@plimeor plimeor commented Oct 18, 2026

Copy link
Copy Markdown
Owner

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 Strong around 重点。. Every emphasis-like run (*, _, ~~, ==) decides left- and right-flanking by the markdown-cjk-friendly amendments (spec at 5b17173, Unicode 18 ranges), as micromark-extension-cjk-friendly does.

How: a new unicode_cjk table (copied from the amendments' ranges.md) and a two-sided classification in delimiter_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 in tests/fixtures/syntax_decisions/cjk_friendly_emphasis.cases with 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*。*b now forms emphasis, as the reference renders it.

Docs: inline-syntax gains "CJK-friendly emphasis flanking" and "CommonMark inlines" names the exception; decision 0018 supersedes 0015; the plan is archived at docs/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

`这是**重点。**然后` 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
@plimeor plimeor self-assigned this Oct 18, 2026
@plimeor
plimeor merged commit 6076e9b into main Oct 18, 2026
2 checks passed
@plimeor
plimeor deleted the claude/project-thread-uuu92j branch October 18, 2026 03:57
@github-actions github-actions Bot mentioned this pull request Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants