You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bold Markdown segments (**...**) fail to render and display literal ** when the text inside ends with CJK punctuation (such as 。, !, ?, ”, )) and is immediately followed by CJK characters without a space.
This happens very frequently in Chinese LLM responses, especially Codex/GPT bullet-point summaries like **小标题。**正文内容.
Minimal reproduction
Broken (renders literal **):
**已返回总部工作。**据美联社报道
**英伟达宣布恢复其总裁、CEO 和董事职务。**公司于美国当地时间11月23日发布公告
Works as expected:
**已返回总部工作。** 据美联社报道 — space after closing **
**已返回总部工作**。据美联社报道 — punctuation outside **
截至 **2026年11月24日**,正常加粗 — non-punctuation before closing **
Expected: the marked segments render in bold without showing literal delimiters.
Root cause
ChatMarkdown uses standard unified/remark/[email protected] following CommonMark 6.2 flanking delimiter rules. A closing ** preceded by Unicode punctuation (。) and followed by a non-whitespace, non-punctuation character (a CJK ideograph) is not considered right-flanking, so it fails to close the strong emphasis.
Related issues / PRs
Related to #21112 (closed as not planned) and closed PRs #8971 and #9183. Unlike isolated quotation marks, **句子。**正文 occurs constantly in Chinese assistant replies and leaves entire bullet lists filled with raw ** markers.
Suggested fix
Enable CJK-friendly emphasis parsing in the ChatMarkdown remark/micromark pipeline, for example via remark-cjk-friendly / micromark-extension-cjk-friendly.
The closing ** is immediately preceded by the Chinese period 。 and immediately followed by the Chinese character 据. Under CommonMark’s rules, when ** is preceded by punctuation, it must be followed by whitespace or punctuation to be recognized as the closing marker for bold text
This is how Markdown is supposed to work, so why is it being called a bug?
Activity
sumuyunxi commentedon Nov 24, 2026
The closing ** is immediately preceded by the Chinese period 。 and immediately followed by the Chinese character 据. Under CommonMark’s rules, when ** is preceded by punctuation, it must be followed by whitespace or punctuation to be recognized as the closing marker for bold text
This is how Markdown is supposed to work, so why is it being called a bug?
sumuyunxi commentedon Nov 24, 2026
I think I understand what you mean. This is an area for improvement.