Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/changelog-1.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ All changes included in 1.9:
- ([#13528](https://github.com/quarto-dev/quarto-cli/pull/13528)): Adds support for table specification using nested lists and the `list-table` class.
- ([#13575](https://github.com/quarto-dev/quarto-cli/pull/13575)): Improve CPU architecture detection/reporting in macOS to allow quarto to run in virtualized environments such as OpenAI's `codex`.
- ([#13656](https://github.com/quarto-dev/quarto-cli/issues/13656)): Fix R code cells with empty `lang: ""` option producing invalid markdown class attributes.
- ([#13776](https://github.com/quarto-dev/quarto-cli/issues/13776)): Do not process tblwidths attributes for non-simple tables, since this breaks rowspan handling.
- ([#13832](https://github.com/quarto-dev/quarto-cli/pull/13832)): Fix `license.text` metadata not being accessible when using an inline license (`license: "text"`), and populate it with the license name for CC licenses instead of empty string. (author: @mcanouil)
- ([#13856](https://github.com/quarto-dev/quarto-cli/issues/13856)): Add code annotation support for Typst and Observable.js code blocks. (author: @mcanouil)
- ([#13890](https://github.com/quarto-dev/quarto-cli/issues/13890)): Fix render failure when using `embed-resources: true` with input path through a symlinked directory. The cleanup now resolves symlinks before comparing paths.
Expand Down
3 changes: 2 additions & 1 deletion src/resources/filters/modules/import_all.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ _quarto.modules = {
string = require("modules/string"),
tablecolwidths = require("modules/tablecolwidths"),
typst = require("modules/typst"),
listtable = require("modules/listtable")
listtable = require("modules/listtable"),
tableutils = require("modules/tableutils"),
}

quarto.brand = _quarto.modules.brand
16 changes: 16 additions & 0 deletions src/resources/filters/modules/tablecolwidths.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@ local function tblColwidthValues(tbl, tblColwidths)
end

local function resolve_table_colwidths_scoped(tbl, scope)
local all_cells = require("modules/tableutils").all_cells
local function is_simple(tbl)
for cell in all_cells(tbl) do
if cell.col_span ~= 1 or cell.row_span ~= 1 then
return false
end
end
return true
end
-- https://github.com/quarto-dev/quarto-cli/issues/13776: do
-- not process a table with to_simple_table/from_simple_table
-- roundtrip is table isn't simple
if not is_simple(tbl) then
return nil
end

-- see if we have a tbl-colwidths attribute
local tblColwidths = nil
if tbl.caption.long ~= nil and #tbl.caption.long > 0 then
Expand Down
33 changes: 33 additions & 0 deletions src/resources/filters/modules/tableutils.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
return {
all_cells = function (tbl)
return coroutine.wrap(function()
-- head rows
for _, row in ipairs(tbl.head.rows) do
for _, cell in ipairs(row.cells) do
coroutine.yield(cell)
end
end
-- body sections
for _, body in ipairs(tbl.bodies) do
-- intermediate head rows
for _, row in ipairs(body.head) do
for _, cell in ipairs(row.cells) do
coroutine.yield(cell)
end
end
-- body rows
for _, row in ipairs(body.body) do
for _, cell in ipairs(row.cells) do
coroutine.yield(cell)
end
end
end
-- foot rows
for _, row in ipairs(tbl.foot.rows) do
for _, cell in ipairs(row.cells) do
coroutine.yield(cell)
end
end
end)
end
}
28 changes: 28 additions & 0 deletions tests/docs/smoke-all/2026/02/23/issue-13776.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
format: html
title: Hello
_quarto:
tests:
html:
ensureFileRegexMatches:
-
- "rowspan.*2.*Yes rows"
-
- "rowspan.*2.*No rows"
---

+--------------+----------------------+
| Col1 | Col2 |
+==============+======================+
| **Yes rows** | <http://example.com> |
| +----------------------+
| | Row2 |
+--------------+----------------------+

+-------------+----------------------+
| Col1 | Col2 |
+=============+======================+
| **No rows** | <http://example.com> |
+-------------+----------------------+
| | Row2 |
+-------------+----------------------+
Loading