-
Notifications
You must be signed in to change notification settings - Fork 220
Open
Labels
Description
When gt does Markdown processing, it uses markdown::mark()
but I've recently become aware that this now uses litedown::mark()
. This has implications for reference processing so this needs to be looked at.
Also, when inside a Quarto render, mark()
is still called. This is shown with this example that issues Warning in replace(z): Reference key(s) not found: tbl-kable-equation
(which comes from markdown::mark()
).
data.frame(
Feature = c("Formatting", "Math", "References", "Media"),
Example = c(
c("**Bold**, *italic*, and `code`"),
"$\\int_{a}^{b} f(x) \\, dx$",
"See @tbl-kable-equation for example of a table",
"{{< video https://www.youtube.com/embed/wo9vZccmqwc >}}"
),
Notes = c(
"Basic markdown formatting",
"LaTeX math expressions",
"Cross-references to other document elements",
"Embedded media using shortcodes"
)
) |>
gt() |>
fmt_markdown(columns = "Example")
In the Quarto context, we should not do any Markdown processing. I think the exception is if tab_options(quarto.disable_processing = TRUE)
is used.
cderv