Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly deactivate math support in Rmd for @includeRmd with math #1306

Merged
merged 1 commit into from
Mar 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions R/rd-include-rmd.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ roxy_tag_rd.roxy_tag_includeRmd <- function(x, base_path, env) {

rmarkdown::render(
rmd_path,
output_format = rmarkdown::github_document(html_preview = FALSE),
output_options = list(
if (packageVersion("rmarkdown") >= "2.12") math_method = NULL
output_format = "github_document",
output_options = c(
list(html_preview = FALSE),
if (packageVersion("rmarkdown") >= "2.12") list(math_method = NULL)
Comment on lines -48 to +51
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could also be done probably by creating the format with option using a do.call(rmarkdown::github_document, ...)
I can change if that better fits the usual practice or if it seems clearer.

),
output_file = md_path,
quiet = TRUE,
Expand Down