Skip to content

fmt_markdown breaks a line and put footnote reference onto new line #993

@Dobrokhotov1989

Description

@Dobrokhotov1989

I've faced an issue when trying to use footnote on the cells formatted with fmt_markdown(). With fmt_markdown() linebreak between cell content and footnote reference (i.e. 1) is added. In the example below, fmt_markdown() does nothing useful but shows the problem.

  library(tidyverse)
  library(gt)
  
  mpg %>%
    sample_n(10) %>%
    select(manufacturer, model, displ, cty, hwy, year) %>%
    gt() %>%
    tab_footnote(
      footnote = "This is old car",
      locations = cells_body(columns = model,
                             rows = year < 2000)
    ) %>%
    cols_hide(columns = year) %>%
    fmt_markdown(columns = model)

Rplot01

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions