Repository navigation
fix(ios): Copy as Markdown no longer splits bold after the first character - #12
Conversation
…acter Copying a selection like **What** from a list item gave **W****hat**: the extractor wrapped each attribute run separately, and runs also split on attributes with no inline meaning, such as the list-marker anchor on an item's first grapheme. Runs with the same inline delimiters as the segment that still ends the output now extend that span. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Thanks! I pointed this at |
On iOS, selecting
**What**in a chat reply and choosing Copy as Markdown pasted**W****hat**. Reported against the T3 Code iOS app 2.2.0.extractMarkdownFromAttributedStringwraps each attribute run in its own delimiters. Runs also split on attributes that have no inline meaning:ListItemRendereranchorsListItemMarkerStartAttributeon a list item's first grapheme, so a bold lead-in such as- **What**: …arrives asW+hat. Links break the same way ([d](url)[ocs](url)).Now, when a run has the same inline delimiters as the segment that still ends the output, its text goes inside that span: the closing delimiters move past it instead of a new span opening. Runs with different formatting are still wrapped separately (
**a***b*).Testing
__tests__/ios/ENRMMarkdownExtractorTests.mm: a bold run split by an unrelated attribute, bold at a list-item start, and adjacent bold/italic runs.MarkdownExtractor.mfor the iOS simulator into a standalone harness with stubbed constants and ran it withsimctl spawn. Shipped code:**W****hat**,- **W****hat**: next,see [d](https://x.y)[ocs](https://x.y) now. Patched:**What**,- **What**: next,see [docs](https://x.y) now.**a***b*is unchanged.clang-format --dry-run --Werrorpasses on both files.yarn turbo run test:ios), so the new test file has not run in the target yet.Reviewed with sol-loop: 1 round with gpt-6.1-sol on high. Sol verdict: approved
Created with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code
Note
Fix iOS Markdown extractor to merge bold spans split across attribute runs
extractMarkdownFromAttributedStringremoves the prior closing delimiters, appends the new text, and restores the closing delimiters after it. Runs with different formatting stay separately wrapped.buildInlineDelimitersin MarkdownExtractor.m now builds separate opening and closing delimiter strings instead of one wrapped string. Formatting checks, nesting order, and link-specific monospace/underline handling are preserved.extractMarkdownFromAttributedStringandbuildInlineDelimitersinMarkdownExtractor.mif consumers rely on per-run wrapping.Macroscope summarized d3bd0d5.