Skip to content

iOS "Copy as Markdown" inserts "****" after the first character of bold text #29012

Closed

Description

@dansanduleac

What happened

In the iOS app, selecting assistant text that contains a bold lead-in such as **What** and choosing Copy as Markdown puts **W****hat** on the clipboard. The bold span is split after its first character, every time.

Diagnosis

"Copy as Markdown" comes from the vendored react-native-enriched-markdown fork (apps/mobile/deps/react-native-enriched-markdown-1.2.0-t3.16-*.tgz). extractMarkdownFromAttributedString (ios/utils/MarkdownExtractor.m) wraps each attribute run in its own delimiters.

Runs also split on attributes with no inline meaning: ListItemRenderer.m anchors ListItemMarkerStartAttribute on the first grapheme of every list item, so - **What**: … arrives as W + hat and becomes **W****hat**. Links break the same way ([d](url)[ocs](url)).

Fix: pingdotgg/enriched-markdown#12 extends the previous span when the next run has identical inline delimiters. T3 Code then needs the vendored tgz bumped.

Steps to reproduce

  1. In the iOS app, open a thread where an assistant reply has a bullet starting with bold text, e.g. - **What**: something.
  2. Long-press to select text that includes the bold word.
  3. Choose Copy as Markdown and paste anywhere.
  4. Expected **What**. Actual **W****hat**.

Version

iOS app 2.2.0 (reported by the user). The extractor is unchanged on pingdotgg/enriched-markdown main (678a5a99) and t3code main (05c0ed7).

Environment

  • iOS app 2.2.0
  • react-native-enriched-markdown 1.2.0-t3.16

Evidence

Shipped MarkdownExtractor.m, compiled for the iOS simulator in a standalone harness:

FAIL split bold: got [**W****hat**] want [**What**]
FAIL list item bold: got [- **W****hat**: next] want [- **What**: next]
FAIL split link: got [see [d](https://x.y)[ocs](https://x.y) now] want [see [docs](https://x.y) now]

With the patch from pingdotgg/enriched-markdown#12, all cases pass.

Related issues

None found in pingdotgg/t3code, pingdotgg/enriched-markdown, or software-mansion/enriched-markdown. Fix PR: pingdotgg/enriched-markdown#12. Nearest older bug: software-mansion/enriched-markdown#847 (fixed in #849).

Fix applied or workaround

Use plain Copy, or delete the stray **** after pasting.

Filed by

Claude Code (Opus 5.5) via t3 triage.

Activity

  1. juliusmarminge commented on Nov 9, 2026

    @juliusmarminge
    Member

    Fixed by #32180, which includes the extractor fix in 986a4f56a8. Thanks for the detailed report and fix!

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

    via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions