diff --git a/news/changelog-1.12.md b/news/changelog-1.12.md index 862d32b463f..5e2c38b2251 100644 --- a/news/changelog-1.12.md +++ b/news/changelog-1.12.md @@ -22,6 +22,7 @@ All changes included in 1.12: - ([#14822](https://github.com/quarto-dev/quarto-cli/issues/14822)): Translate the `tools-share`, `tools-download`, and `skip-to-content` language keys in Greek. (author: @sogav21) - ([#14822](https://github.com/quarto-dev/quarto-cli/issues/14822)): The Lithuanian search label and the Swedish caution callout title no longer fall back to English. - ([#15126](https://github.com/quarto-dev/quarto-cli/issues/15126)): Translate the `revealjs-menu-button-label` language key in Brazilian Portuguese. (author: @bonijoao) +- ([#15219](https://github.com/quarto-dev/quarto-cli/issues/15219)): Tables written as raw HTML no longer get equal-width `` columns when a cell contains block content, so widths set on table cells apply. - ([#15223](https://github.com/quarto-dev/quarto-cli/pull/15223)): Directories are now read in a fixed order (sorted by name in character-code order, not by locale) on every platform. Extension discovery, the theme list of `quarto capabilities`, and the items of a MECA bundle no longer depend on the file system's listing order; when two extensions share an id, which one wins can differ from earlier versions. - ([#15268](https://github.com/quarto-dev/quarto-cli/issues/15268)): Translate the `skip-to-content` language key in Bulgarian, Catalan, Czech, Danish, Finnish, Hebrew, Indonesian, Korean, Lithuanian, Norwegian Bokmål, Norwegian Nynorsk, Polish, Russian, Serbian (Latin), Slovak, Slovenian, Swedish, Turkish and Ukrainian, using reviewed machine translation. diff --git a/src/resources/filters/normalize/astpipeline.lua b/src/resources/filters/normalize/astpipeline.lua index 11b148ded64..9177ca01f9e 100644 --- a/src/resources/filters/normalize/astpipeline.lua +++ b/src/resources/filters/normalize/astpipeline.lua @@ -167,12 +167,21 @@ function quarto_ast_pipeline() local tableDoc = pandoc.read(tableHtml, "html+raw_html") local found = false local skip = false + -- Pandoc fills in 1/ncols widths for tables with block content + -- when the source declares no widths; those are not + -- author widths, so discard them. + local hasColWidths = tableHtml:lower():find("][^>]*width%s*[:=]") _quarto.traverser(tableDoc, { Table = function(table) found = true if table.attributes[constants.kDisableProcessing] == "true" then skip = true end + if not hasColWidths then + for _, spec in ipairs(table.colspecs) do + spec[2] = nil + end + end end, }) if #tableDoc.blocks ~= 1 then diff --git a/tests/docs/smoke-all/2026/11/03/issue-15219.qmd b/tests/docs/smoke-all/2026/11/03/issue-15219.qmd new file mode 100644 index 00000000000..da51ba6ab12 --- /dev/null +++ b/tests/docs/smoke-all/2026/11/03/issue-15219.qmd @@ -0,0 +1,20 @@ +--- +format: html +_quarto: + tests: + html: + ensureHtmlElements: + - [] + - ['colgroup'] +--- + +```{=html} + + + + + + + +
a
b
c
123
+```