Skip to content

markdown bulleted list in cell - duplicated text #2140

Open

Description

@lauren-obrien

Prework

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

  1. cmadland commented on Oct 7, 2026

    @cmadland

    Same issue for me

    Session Info

    R version 4.6.1 (2026-06-24)
    Platform: aarch64-apple-darwin23
    Running under: macOS Golden Gate 27.0.1
    
    Matrix products: default
    BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
    LAPACK: /Library/Frameworks/R.framework/Versions/4.6/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.1
    
    locale:
    [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
    
    time zone: America/Vancouver
    tzcode source: internal
    
    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base     
    
    other attached packages:
    [1] gt_1.3.0    dplyr_1.2.1
    
    loaded via a namespace (and not attached):
     [1] vctrs_0.7.3      cli_3.6.6        rlang_1.3.0      xfun_0.59        processx_3.9.0   renv_1.2.3      
     [7] generics_0.1.4   litedown_0.9     glue_1.8.1       markdown_2.0     htmltools_0.5.9  ps_1.9.3        
    [13] sass_0.4.10      pak_0.10.0       tibble_3.3.1     fastmap_1.2.0    lifecycle_1.0.5  compiler_4.6.1  
    [19] fs_2.1.0         pkgconfig_2.0.3  digest_0.6.39    R6_2.6.1         tidyselect_1.2.1 pillar_1.11.1   
    [25] callr_3.8.0      commonmark_2.0.0 magrittr_2.0.5   tools_4.6.1      withr_3.0.3      xml2_1.6.0 
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions