| … | … | @@ -482,6 +501,23 @@ function appendNode( | |
| 507 | + | const fileContext = { | |
| 508 | + | ...context, | |
| 509 | + | href: presentation.href, | |
| 510 | + | sourceText: `[${label.replace(/[\\[\]]/g, "\\$&")}](<${presentation.href}>)`, | |
🟡 Medium src/nativeMarkdownText.ts:510
Descriptive file links lose label formatting when copied: [**important** details](/repo/a.ts) is emitted as [important details](</repo/a.ts>), so bold, italic, strikethrough, and inline-code markup is silently dropped. This happens because sourceText is rebuilt from textNodeContent(nodeTextContent(node)), which contains only rendered text; preserve the link label's original Markdown source when constructing sourceText.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/mobile/modules/t3-markdown-text/src/nativeMarkdownText.ts around line 510: |
| 2 | |
| 3 | Descriptive file links lose label formatting when copied: `[**important** details](/repo/a.ts)` is emitted as `[important details](</repo/a.ts>)`, so bold, italic, strikethrough, and inline-code markup is silently dropped. This happens because `sourceText` is rebuilt from `textNodeContent(nodeTextContent(node))`, which contains only rendered text; preserve the link label's original Markdown source when constructing `sourceText`. |
Note
Written by gpt-6.1-sol on behalf of Maria
Fixed in b6f2352395. Native copy reconstructs bold, italic, strikethrough, inline-code delimiters, and escaped text from the label nodes. Existing tests verify formatted labels with expanded/collapsed destination chips and repeated links. Blacksmith passed 84 focused mobile tests.
| … | … | @@ -1183,21 +1185,26 @@ function useMarkdownStyles( | |
| 1200 | - | </NativeText> | |
| 1192 | + | <MarkdownLinkLabelContext.Provider value> | |
| 1193 | + | <NativeText onPress={() => onLinkPress(href)} style={{ color: inlineTextColor }}> | |
| 1194 | + | {!isMarkdownFileLinkLabel(getTextContent(node), href) && <>{children} </>} | |
🟠 High threads/ThreadFeed.tsx:1194
A file link whose label contains an image renders ThreadMarkdownImageView beneath the outer NativeText, so React Native cannot lay out the label and may throw a nested-view-under-text error. Render only the label's text content here instead of arbitrary children.
| 1 | {!isMarkdownFileLinkLabel(getTextContent(node), href) && <>{getTextContent(node)} </>} |
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/mobile/src/features/threads/ThreadFeed.tsx around line 1194: |
| 2 | |
| 3 | A file link whose label contains an image renders `ThreadMarkdownImageView` beneath the outer `NativeText`, so React Native cannot lay out the label and may throw a nested-view-under-text error. Render only the label's text content here instead of arbitrary `children`. |
Note
Written by gpt-6.1-sol on behalf of Maria
Fixed in b6f2352395. Images inside link labels now render their alt text as NativeText through the existing link-label context, retaining bold/code formatting on the surrounding prose. Standalone images keep their renderer. Blacksmith mobile typecheck and 84 focused mobile tests passed; native device UI remains unverified.
Confirmed: image labels now render text-only under NativeText, while standalone images retain their renderer.