Repository navigation
fix: copied table cells keep their line breaks as <br> - #1144
Open
juliusmarminge wants to merge 2 commits into
Open
juliusmarminge wants to merge 2 commits into
juliusmarminge wants to merge 2 commits into
Conversation
A table cell's serialized markdown joined a line break with a raw newline, which ends the table row, so Copy as Markdown split the row. Write the break as <br> instead, on iOS and Android, keeping escaped backslashes before it. From pingdotgg/t3code#29355.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
juliusmarminge
force-pushed
the
fix/table-cell-line-breaks
branch
from
November 9, 2026 01:40
b4002dc to
6b2f187
Compare
juliusmarminge
added a commit
to pingdotgg/t3code
that referenced
this pull request
Nov 9, 2026
…rkdown fork #29355 patched the t3.16 archive so a line break in a copied table cell becomes <br>. The t3.18 archive replaces it, so the fork now carries the same change (upstream as software-mansion/enriched-markdown#1144) and the pnpm patch goes away. Co-authored-by: shivam <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What/Why?
Copy as Markdown on a table whose cell holds a line break splits the row. The cell's serialized markdown keeps the break as a raw newline, which ends a table row, so the pasted table has an extra, broken row.
This writes a line break inside a table cell as
<br>, on iOS (markdownFromTableCellNode) and Android (MarkdownASTSerializer.serializeTableCell). Both the per-cell copy data and the whole-table markdown use it. A backslash right before the break is doubled, so it stays a literal backslash instead of escaping the<.We shipped this in T3 Code's mobile app as a patch on our archive (pingdotgg/t3code#29355, by shivam, whose commit this carries), where
<br>in a table cell renders as a line break. The second commit adds the tests.Testing
ClipboardExportTest(Android) andENRMClipboardExportTests(iOS) each get a case: a cell withone\ntwoserializes asone<br>two, anda\before a break asa\\<br>b.MarkdownASTSerializer.mandMarkdownASTNode.minto a standalone binary that runs the same inputs:one<br>two,a\\<br>b, andplainunchanged.PR Checklist
Opened by Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code