Skip to content

Using a heading with tab_header() causes an HTML table to not render correctly in Quarto (v1.3+) #1235

@rich-iannone

Description

@rich-iannone

As originally reported in quarto-dev/quarto-cli#4603, HTML-based gt tables with a heading (i.e., those produced through tab_header()) produce invalid HTML (two <thead> elements) which is understandably not parsed correctly by Pandoc (though browsers are okay with this markup).

To solve this, there should only be a single <thead> element. So, the heading (if present) should reside in the same element as the column labels (if they are to be displayed). The CSS classes will move to the child <tr> elements. This needs to be tested well to avoid any major regressions.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions