cols_witdth breaks panel-tabset div in quarto
yannsay-impact opened this issue · 0 comments
Prework
- Read and agree to the code of conduct and contributing guidelines.
- If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
Description
Using cols_width
makes the panel-tabset div act as raw. The tabset div are shown as raw text.
Reproducible example (qmd file)
---
title: "repex"
format: html
---
```{r}
library(gt)
```
::: {.panel-tabset}
## Without tabset
gt without tabset.
```{r}
#| results: asis
for (i in 1:2) {
cat(paste("##", i, "\n"))
gt::gtcars %>%
gt() |>
as_raw_html() |>
cat()
}
```
:::
::: {.panel-tabset}
## With tabset
gt with tabset.
```{r}
#| results: asis
for (i in 1:2) {
cat(paste("##", i, "\n"))
gt::gtcars %>%
gt() |>
cols_width(everything() ~ px(200)) |>
as_raw_html() |>
cat()
}
```
:::
Expected result
Expected results is to have a tabset with the different tables.
Session info
End the reproducible example with a call to sessionInfo()
in the same session (e.g. reprex(session_info = TRUE)
) and include the output.
R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)
Matrix products: default
locale:
[1] LC_COLLATE=English_Switzerland.utf8 LC_CTYPE=English_Switzerland.utf8 LC_MONETARY=English_Switzerland.utf8
[4] LC_NUMERIC=C LC_TIME=English_Switzerland.utf8
time zone: Europe/Zurich
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] digest_0.6.36 utf8_1.2.4 R6_2.5.1 fastmap_1.2.0 tidyselect_1.2.1 magrittr_2.0.3
[7] glue_1.7.0 tibble_3.2.1 htmltools_0.5.8.1 pkgconfig_2.0.3 gt_0.11.0 dplyr_1.1.4
[13] generics_0.1.3 lifecycle_1.0.4 xml2_1.3.6 cli_3.6.2 fansi_1.0.6 vctrs_0.6.5
[19] compiler_4.4.0 rstudioapi_0.16.0 tools_4.4.0 pillar_1.9.0 rlang_1.1.4