Skip to content

Markdown viewer: colspan/rowspan support for raw HTML tables #13953

Open

Description

@fbartho

Summary

Split out of #13726 during spec review (PR #13661): the raw-HTML <table> spec deliberately delivers the un-spanned subset first, and colspan/rowspan — which #13726's motivating text mentions — need their own slice.

Why it's a separate slice

Span support is a model-level change, not a parser addition: the flat rectangular grid is baked into FormattedTable (per-column alignments/uniform rows), measure_table_cells, LaidOutTable, the table painter, and the table offset maps — none of which have a concept of a cell occupying multiple grid slots (verified: zero colspan/rowspan references in crates/editor). Speccing spans properly means designing occupancy/merging through all of those layers.

Behavior once #13726's subset lands

Spanned tables degrade deterministically per the spec's malformed-input rules (defined in specs/GH13726/ on PR #13661) rather than rendering a broken grid.

Expected

colspan/rowspan render merged cells, matching GitHub's raw-HTML table rendering.

Related: #13726 (base raw-HTML tables), #13661 (spec PR for the un-spanned subset).

Activity

  1. warp-for-oss commented on Jul 18, 2026

    @warp-for-oss
    Contributor

    @fbartho

    Here's what I found while triaging this issue:

    This looks like a distinct enhancement for merged-cell rendering in Markdown/raw-HTML tables. It is related to #13726, but not a duplicate of the base raw-HTML table support.

    Maintainer details

    I concluded that raw HTML table span support is a distinct Markdown viewer enhancement that requires adding cell-span metadata through the table parser/model/layout/rendering stack..

    Triage summary

    This is an enhancement request for Markdown viewer support for raw HTML table colspan and rowspan, split from the base raw-HTML table work tracked in #13726 / PR #13661. The request is actionable as a distinct merged-cell rendering slice once the unspanned raw-HTML table subset exists.

    Reproducibility

    High. The report gives a concrete target behavior, and code inspection confirms the current table pipeline cannot represent spans today.

    Likely implementation area

    • crates/markdown_parser/src/html_parser.rs currently treats table as a skipped top-level container and does not build a structured table from HTML DOM nodes.
    • crates/markdown_parser/src/lib.rs defines FormattedTable as headers, per-column alignments, and rectangular rows; there is no per-cell span metadata.
    • crates/markdown_parser/src/markdown_parser.rs parses GFM pipe tables into the same flat FormattedTable shape.
    • crates/editor/src/render/model/mod.rs, crates/editor/src/render/model/table_offset_map.rs, and crates/editor/src/render/element/table.rs lay out, hit-test, select, and paint tables by uniform row/column vectors, so merged cells would need model, layout, offset-map, and painter changes rather than only parser changes.
    • crates/editor/src/content/markdown.rs serializes tables back to <th>/<td> without span attributes, which would also need updating for round-trip/export parity.

    Duplicate check

    Searched all 3,807 open non-PR issues and the 37 issues closed in the last 7 days. #13726 and recently closed #13652 are related parent/umbrella raw-HTML-table issues, but they do not specifically cover the colspan/rowspan slice; no duplicate candidates met the two-issue threshold.

    This is my automated analysis and may be incorrect. A maintainer will verify the details.

    Powered by Oz

  2. added
    area:editor-notebooks
    enhancement
    repro:high
    triaged
    on Jul 18, 2026
  3. added
    warp:tracking
    on Jul 29, 2026
  4. removed their assignment
    on Jul 29, 2026
  5. bnavetta commented on Jul 29, 2026

    @bnavetta
    Contributor

    Thanks for splitting out these issues! Marking this one as tracking - unlike HTML table support (your specs are on my list to review!) this will need some significant changes to the layout system and table UI component. Before committing to add support, it’d be helpful to gauge how widespread interest is in the community

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:editor-notebooksenhancementrepro:hightriagedwarp:auto-triage-reviewwarp:tracking

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions