Repository navigation
markdown bulleted list in cell - duplicated text #2140
Description
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
In a gt table within a quarto document, with a column formatted using fmt_markdown(), I see unexpected text duplication when the cell contains only a bulleted (or numbered) list and no lead-in text above. This duplication doesn't appear in the viewer pane when executing the code cell in RStudio, only when rendering the full document to html. I have raised the issue with the quarto devs in quarto-dev/quarto-cli#14397 and been referred here.
Reproducible example
---
title: "reprex_gt_md"
editor_options:
chunk_output_type: console
---
```{r}
library(dplyr)
library(tibble)
library(gt)
```
```{r}
#| label: tbl-test
#| tbl-cap: "test"
dat_demo <-
tribble(
~Col_A, ~Col_B,
'A', 'Plain sentence',
'B', 'Sentence with
- bullet point 1
- bullet point 2',
'C', '- bullet point 1
- bullet point 2',
'D', '
- bullet point 1
- bullet point 2')
tbl_demo <- gt(dat_demo) |>
tab_options(
#, quarto.disable_processing = TRUE # stops duplicate text in row C, but breaks cell stripe formatting
) |>
fmt_markdown(columns = 2) |>
cols_width(Col_A ~pct(10))
tbl_demo
```
Expected result
Text in row C, Col_B should look like
- bullet point 1
- bullet point 2
not
bullet point1bullet point2
- bullet point 1
- bullet point 2
I've tried various options for whitespace placement, different bullet symbols, etc as outlined in the documentation but so far the best solution I have is in Row D, where a non-breaking space is inserted above the list. This still adds an empty line.
Session info
sessionInfo()
R version 4.5.3 (2026-03-11 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26100)
Matrix products: default
LAPACK version 3.12.1
locale:
[1] LC_COLLATE=English_New Zealand.utf8 LC_CTYPE=English_New Zealand.utf8 LC_MONETARY=English_New Zealand.utf8 LC_NUMERIC=C
[5] LC_TIME=English_New Zealand.utf8
time zone: Pacific/Auckland
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] gt_1.3.0 tibble_3.3.1 dplyr_1.2.1
loaded via a namespace (and not attached):
[1] vctrs_0.7.3 cli_3.6.6 knitr_1.51 rlang_1.2.0 xfun_0.57 otel_0.2.0 generics_0.1.4 litedown_0.9 glue_1.8.0
[10] markdown_2.0 htmltools_0.5.9 sass_0.4.10 evaluate_1.0.5 fastmap_1.2.0 lifecycle_1.0.5 compiler_4.5.3 fs_2.0.1 pkgconfig_2.0.3
[19] rstudioapi_0.18.0 digest_0.6.39 R6_2.6.1 tidyselect_1.2.1 pillar_1.11.1 commonmark_2.0.0 magrittr_2.0.5 tools_4.5.3 withr_3.0.2
[28] xml2_1.5.2
Activity
cmadland commentedon Oct 7, 2026
Same issue for me
Session Info