-
Is there a way to avoid em dash conversion in fmt_markdown?
reason I want to use fmt_markdown is for newlines to be introduced via |
Beta Was this translation helpful? Give feedback.
Answered by
olivroy
Jul 4, 2024
Replies: 1 comment
-
You'd have to do a manual transformation of your input before. # this does what you want.
dplyr::tibble(x = '\\-\\-\\-') |> gt() |> fmt_markdown() Programatically, you can do dplyr::tibble(x = '---') |> dplyr::mutate(x = gsub("-", "\\\\-", x))|> gt() |> fmt_markdown()
# or with stringr
dplyr::tibble(x = '---') |> dplyr::mutate(x = stringr::str_replace_all(x, "-", "\\\\-"))|> gt() |> fmt_markdown() The problem is that |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
rich-iannone
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You'd have to do a manual transformation of your input before.
Programatically, you can do
The problem is that
---
is em-dash in markdown, so you need to make sure it looks like\-
to avoid markdown interpretation.