Repository navigation
fix(clipboard): preserve table cell line breaks and math - #995
Closed
Yash-Singh1 wants to merge 1 commit into
Closed
Yash-Singh1 wants to merge 1 commit into
Yash-Singh1 wants to merge 1 commit into
Conversation
Yash-Singh1
force-pushed
the
fix/html-clipboard-round-trips
branch
from
October 15, 2026 00:16
26a93f8 to
3be6e76
Compare
Yash-Singh1
marked this pull request as ready for review
October 15, 2026 19:32
Collaborator
|
Carried as #1019, which has your commit first, rebased onto current main, and one follow-up on top: the iOS HTML exporter now splits on paragraphs instead of lines so a hard break stays inside its block as |
2 of 6 tasks
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?
Copying a table loses cell line breaks in HTML and omits inline equation delimiters in Copy as Markdown.
Extend the existing HTML escapers to emit
<br>for inline line separators, including CRLF as one break. Keep code-block newlines literal. Serialize inline math with$...$, matching the existing Markdown extractor. Regular Copy and the HTML math fallback keep their existing delimiter behavior.Closes #992. This draft is for maintainer discussion under the contribution guide.
Testing
Before and after
Before is the unchanged upstream base
766fc0e; after is this PR at3be6e76. Each platform uses the same fixture before and after. The fixture calls production native exporters with attributed table-cell data and AST nodes, writes and reads the system clipboard, then imports the HTML with the platform reader or renders the copied Markdown. These captures exercise exporters directly rather than the selection menu.iOS
Table-cell line breaks. Before, HTML paste collapses the cell into
first second. After, it preserves two lines.Table Markdown with inline math. Before, copied Markdown is
x_1and renders as plain text. After, it is$x_1$and renders as math.Android
Table-cell line breaks. Before, HTML paste collapses the cell into
first second. After, it preserves two lines.Table Markdown with inline math. Before, copied Markdown is
x_1and renders as plain text. After, it is$x_1$and renders as math.PR Checklist
Generated by GPT 6.1 Sol using the Codex harness.