I have:
Bug description
In a gt table, 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 cell in RStudio, only when rendering to html.
Steps to reproduce
---
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(
column_labels.font.weight = 'bold',
heading.title.font.weight = 'bold',
table.align = 'center',
table.width = '85%'
#, quarto.disable_processing = TRUE # stops duplicate text in row C, but breaks cell stripe formatting
) |>
tab_style(style = list(cell_text(color = 'red',
weight = 'bold',
align = 'center')),
locations = cells_body(columns = 1)) |>
fmt_markdown(columns = 2) |>
cols_width(Col_A ~pct(10))
tbl_demo
```
Actual behavior
Text in row C, Col_B repeats itself above the two bullet points.
Expected behavior
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.
Your environment
- IDE: RStudio 2026.01.1 +403
- OS: Windows 11
Quarto check output
$ quarto check
Quarto 1.9.37
[>] Checking environment information...
Quarto cache location: C:\Users\OBrienL\AppData\Local\quarto
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.8.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.4.5: OK
Typst version 0.14.2: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.9.37
Path: C:\Program Files\Quarto\bin
CodePage: 1252
[>] Checking tools....................OK
TinyTeX: v2024.02
Chromium: (not installed)
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[>] Checking LaTeX....................OK
Using: TinyTex
Path: C:\Users\OBrienL\AppData\Roaming\TinyTeX\bin\windows\
Version: 2023
[>] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
Source: Windows Registry
[>] Checking basic markdown render....OK
[>] Checking R installation...........OK
Version: 4.5.3
Path: C:/R/R-4.5.3
LibPaths:
- C:/R/R-4.5.3/library
knitr: 1.51
rmarkdown: 2.31
[>] Checking Knitr engine render......OK
[>] Checking Python 3 installation....OK
Version: 3.11.4
Path: C:/Python311/python.exe
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with py -m pip install jupyter
[>] Checking Julia installation...
I have:
Bug description
In a
gttable, with a column formatted usingfmt_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 cell in RStudio, only when rendering to html.Steps to reproduce
Actual behavior
Text in row C, Col_B repeats itself above the two bullet points.
Expected behavior
Text in row C, Col_B should look like
not
bullet point1bullet point2
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.
Your environment
Quarto check output