Skip to content

[Bug]: CJK punctuation before closing ** breaks bold rendering (e.g. **文本。**后续文字) #41881

Done

Description

@mengbo-ji

Version

T3 Code Desktop (Beta) v0.1.11 (macOS)

Summary

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.

Activity

  1. sumuyunxi commented on Nov 24, 2026

    @sumuyunxi

    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?

  2. sumuyunxi commented on Nov 24, 2026

    @sumuyunxi

    I think I understand what you mean. This is an area for improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions