Skip to content

docs(specs): markdown viewer HTML <table> support (GH13652)#13661

Draft
fbartho wants to merge 1 commit into
warpdotdev:masterfrom
fbartho:fbartho/gh13652-markdown-tables-spec
Draft

docs(specs): markdown viewer HTML <table> support (GH13652)#13661
fbartho wants to merge 1 commit into
warpdotdev:masterfrom
fbartho:fbartho/gh13652-markdown-tables-spec

Conversation

@fbartho

@fbartho fbartho commented Jul 13, 2026

Copy link
Copy Markdown

What

Spec (product.md + tech.md, per CONTRIBUTING's spec-first workflow for feature requests) for teaching the Markdown viewer to render raw-HTML <table> markup (<thead>/<tbody>/<tr>/<th>/<td>) by mapping it onto Warp's existing table model and render path, and to honor <br> inside cells.

Part of #13652 — tier-zero tag #3, following <img> sizing (#13656) and <details>/<summary> (#13660).

Why

Warp already renders GFM pipe-tables (behind MarkdownTables). The issue asks for HTML tables specifically for the two things GFM syntax cannot express: cells with a hard line break (<br>) and cells that span columns/rows (colspan/rowspan). Raw <table> markup is currently dropped.

Highlights

  • Recognize a block-level HTML <table> and render it through the existing table layout/render/scroll/selection path — same appearance as an equivalent GFM table.
  • <th>/<thead> → header row, <td> rows → data; inline formatting and inline images (per docs(specs): markdown viewer raw-HTML <img> sizing (GH13652) #13656) render inside cells.
  • Honor <br> inside a cell as an authored hard line break — the primary capability GFM pipe tables lack. The renderer already does multi-line cells (wrapping); this makes the break first-class.
  • Alignment via align/text-align; ragged rows normalized; only structural tags + alignment attributes read; no script/navigation.
  • Rides the existing MarkdownTables feature flag; no GFM-table behavior change.

Honest scope note (three slices, sized)

  • Simple HTML table → small: it is a rectangular grid, maps onto the existing FormattedTable with zero editor changes — but barely beats GFM pipe tables.
  • <br> in cells → medium: the value-add. The renderer supports multi-line cells, but the cell type and the internal round-trip format (which uses \n as the row delimiter) can't represent an authored break, so it needs a cell-model + serialization change. This spec commits to it.
  • colspan/rowspan → large, explicit non-goal here: the flat rectangular grid (one width/column, one height/row, [row][col] indexing) is baked into the data model, layout, painter, and offset maps. Spanning needs a non-rectangular grid across all of them. Degraded to a single ordinary cell (span ignored — no crash, no corrupt grid) and deferred to its own effort.

Flagging the cell-model change (touches the shared FormattedTable type) and the simple-vs-<br> split as the key decisions for review — happy to split simple-table and <br> into two PRs if you'd prefer.

Process note

#13652 is currently enhancement, triaged (not yet ready-to-spec) — opening ahead of the label per CONTRIBUTING's linked-issue allowance; happy to sequence differently. Nested under specs/GH13652/ following the specs/APP-4319/<slug>/ precedent for one issue split across a chain of PRs.

Warp already renders GFM pipe-tables but drops raw-HTML `<table>` markup. The
issue wants HTML tables specifically for what GFM can't express: `<br>` line
breaks in cells and colspan/rowspan.

This adds the product + tech spec for tier-zero tag warpdotdev#3 of warpdotdev#13652: recognize a
block-level HTML `<table>`/`<thead>`/`<tbody>`/`<tr>`/`<th>`/`<td>` and map it
onto Warp's existing FormattedTable + render path. Scopes the slices honestly:
simple table (small, reuses the whole render chain), `<br>`-in-cell (medium,
needs a cell-type + serialization change — the capability that makes HTML tables
worth having), and colspan/rowspan (large, an explicit non-goal degraded to
single-cell, deferred to its own effort since it needs a non-rectangular grid).

Nested under specs/GH13652/ (per the specs/APP-4319/<slug>/ chain precedent).
@cla-bot

cla-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @fbartho on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Jul 13, 2026
@fbartho

fbartho commented Jul 13, 2026

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Jul 13, 2026
@cla-bot

cla-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant