Skip to content

Footnote marker appears in new line if formatted with Markdown #893

@turbanisch

Description

@turbanisch

With default formatting, the footnote marker appears right after the cell content:

library(tidyverse)
library(gt)

table <- mtcars %>% 
  head(5) %>% 
  select(1:3) %>% 
  gt() %>% 
  tab_footnote(footnote = "A footnote.", 
               locations = cells_body(1, 3)) 

table

image

If the column where the footnote marker appears is formatted using Markdown, however, the marker appears on a new line:

table %>% 
  fmt_markdown(columns = 1)

image

sessionInfo()
#> R version 4.1.2 (2021-11-01)
#> Platform: aarch64-apple-darwin20 (64-bit)
#> Running under: macOS Monterey 12.1
#> 
#> Matrix products: default
#> BLAS:   /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRblas.0.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib
#> 
#> locale:
#> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] digest_0.6.29   withr_2.4.3     magrittr_2.0.2  reprex_2.0.1   
#>  [5] evaluate_0.14   highr_0.9       stringi_1.7.6   rlang_1.0.1    
#>  [9] cli_3.1.1       rstudioapi_0.13 fs_1.5.2        rmarkdown_2.11 
#> [13] tools_4.1.2     stringr_1.4.0   glue_1.6.1      xfun_0.29      
#> [17] yaml_2.2.2      fastmap_1.1.0   compiler_4.1.2  htmltools_0.5.2
#> [21] knitr_1.37

Created on 2022-02-13 by the reprex package (v2.0.1)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions