fix(render): put each table cell on its own line in plain text output

CO
3d ago
+84-15

With plainText: true, the text of adjacent <td> cells is joined with no separator, so a layout table (a Row with two Columns) turns two links into one run-on line:

https://apps.apple.com/xhttps://play.google.com/x

html-to-text treats td/th as inline, and unstableToPlainText kept td/tr out of TAG_BLOCKS to match it, so both converters did this.

One line per cell in both now:

  • toPlainText: td and th selectors with format: "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/th in TAG_BLOCKS with open: 1, close: 1.

An empty spacer cell contributes nothing, so <td></td> leaves no blank line, and caption/tr are unchanged. The two converters still agree, which the parity cases in unstable-to-plain-text.spec.ts check; the case that pinned the old run-together output is replaced with the new expectations, and to-plain-text.spec.ts gets the same three cases.

pnpm vitest run in packages/render: 94 passed. Changeset added as a patch.


Summary by cubic

Fixes table cells running together in plain text output. Adjacent td/th cells were joined with no separator, so a layout table (Row with two Columns) holding two links came out as one run-on line. Each cell now gets its own line in both toPlainText and unstableToPlainText.

  • Empty spacer cells add no blank line, and caption/tr are unchanged.
  • Callers can still restore inline cells with { selector: 'td', format: 'inline' }.
  • Shipped as a patch release in @react-email/render.