From f3c30e9325bef0f7dae7823fbd46545dd36d45c5 Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Tue, 4 Jun 2024 07:13:56 -0700 Subject: [PATCH 1/3] lua,tables - don't process if content is empty --- src/resources/filters/quarto-pre/table-classes.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/resources/filters/quarto-pre/table-classes.lua b/src/resources/filters/quarto-pre/table-classes.lua index 5080d1628e2..f46118f5dfa 100644 --- a/src/resources/filters/quarto-pre/table-classes.lua +++ b/src/resources/filters/quarto-pre/table-classes.lua @@ -62,6 +62,9 @@ function table_classes() if kind ~= "tbl" then return nil end + if float.content == nil then + return nil + end if (float.caption_long == nil or float.caption_long.content == nil or From a5b9a96d4f6758702dc77a9fe24ac3a12046ec7c Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Tue, 4 Jun 2024 07:15:48 -0700 Subject: [PATCH 2/3] regression test --- tests/docs/smoke-all/2024/06/04/9862.qmd | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/docs/smoke-all/2024/06/04/9862.qmd diff --git a/tests/docs/smoke-all/2024/06/04/9862.qmd b/tests/docs/smoke-all/2024/06/04/9862.qmd new file mode 100644 index 00000000000..896b7d857cc --- /dev/null +++ b/tests/docs/smoke-all/2024/06/04/9862.qmd @@ -0,0 +1,13 @@ +--- +title: "Untitled" +format: html +execute: + echo: false +--- + +```{r} +#| eval: false +#| label: tbl-t2 +#| tbl-cap: hggfh +mtcars |> head() |> knitr::kable() +``` From e272a206b716621a914935f4f93e6258775b6244 Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Tue, 4 Jun 2024 07:17:33 -0700 Subject: [PATCH 3/3] changelog --- news/changelog-1.5.md | 1 + 1 file changed, 1 insertion(+) diff --git a/news/changelog-1.5.md b/news/changelog-1.5.md index f37c41e6a54..1b0e6ac297d 100644 --- a/news/changelog-1.5.md +++ b/news/changelog-1.5.md @@ -135,6 +135,7 @@ All changes included in 1.5: - ([#8417](https://github.com/quarto-dev/quarto-cli/issues/8417)): Maintain a single AST element in the output cells when parsing HTML from RawBlock elements. - ([#8582](https://github.com/quarto-dev/quarto-cli/issues/8582)): Improve the algorithm for extracting table elements from HTML RawBlock elements. - ([#8770](https://github.com/quarto-dev/quarto-cli/issues/8770)): Handle inconsistently-defined float types and identifier names more robustly in HTML tables. +- ([#9862](https://github.com/quarto-dev/quarto-cli/issues/9862)): Fix crash with labeled tables in cells with `eval: false` and `echo: false`. ## Engines