Skip to content

Commit bee87fb

Browse files
authored
Merge pull request #9865 from quarto-dev/bugfix/9862
Lua,tables - fix crash on Table FloatRefTargets with `echo: false` and `eval: false`
2 parents b34b24d + e272a20 commit bee87fb

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

news/changelog-1.5.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ All changes included in 1.5:
135135
- ([#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.
136136
- ([#8582](https://github.com/quarto-dev/quarto-cli/issues/8582)): Improve the algorithm for extracting table elements from HTML RawBlock elements.
137137
- ([#8770](https://github.com/quarto-dev/quarto-cli/issues/8770)): Handle inconsistently-defined float types and identifier names more robustly in HTML tables.
138+
- ([#9862](https://github.com/quarto-dev/quarto-cli/issues/9862)): Fix crash with labeled tables in cells with `eval: false` and `echo: false`.
138139

139140
## Engines
140141

src/resources/filters/quarto-pre/table-classes.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ function table_classes()
6262
if kind ~= "tbl" then
6363
return nil
6464
end
65+
if float.content == nil then
66+
return nil
67+
end
6568

6669
if (float.caption_long == nil or
6770
float.caption_long.content == nil or
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: "Untitled"
3+
format: html
4+
execute:
5+
echo: false
6+
---
7+
8+
```{r}
9+
#| eval: false
10+
#| label: tbl-t2
11+
#| tbl-cap: hggfh
12+
mtcars |> head() |> knitr::kable()
13+
```

0 commit comments

Comments
 (0)