Repository navigation
fix(render): put each table cell on its own line in plain text output - #3852
Open
compiler-segfault wants to merge 1 commit into
Open
compiler-segfault wants to merge 1 commit into
compiler-segfault wants to merge 1 commit into
Conversation
Adjacent td/th cells are inline in html-to-text, so \<td>A</td><td>B</td>\ came out as \AB\. A layout table (Row/Column) holds separate links or words side by side, so two app-store links collapsed into one run-on line.
Contributor
|
@compiler-segfault is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 1c8defb The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
With
plainText: true, the text of adjacent<td>cells is joined with no separator, so a layout table (aRowwith twoColumns) turns two links into one run-on line:html-to-texttreatstd/thas inline, andunstableToPlainTextkepttd/trout ofTAG_BLOCKSto match it, so both converters did this.One line per cell in both now:
toPlainText:tdandthselectors withformat: "block"and one leading and trailing line break. They come before the caller's selectors, so{ selector: 'td', format: 'inline' }still restores the old output.unstableToPlainText:td/thinTAG_BLOCKSwithopen: 1, close: 1.An empty spacer cell contributes nothing, so
<td></td>leaves no blank line, andcaption/trare unchanged. The two converters still agree, which the parity cases inunstable-to-plain-text.spec.tscheck; the case that pinned the old run-together output is replaced with the new expectations, andto-plain-text.spec.tsgets the same three cases.pnpm vitest runinpackages/render: 94 passed. Changeset added as a patch.Summary by cubic
Fixes table cells running together in plain text output. Adjacent
td/thcells were joined with no separator, so a layout table (Rowwith twoColumns) holding two links came out as one run-on line. Each cell now gets its own line in bothtoPlainTextandunstableToPlainText.caption/trare unchanged.{ selector: 'td', format: 'inline' }.@react-email/render.Written for commit 1c8defb. Summary will update on new commits.