From 76ebaab353d570e906ea5165bc6463b93dc1d982 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 24 Mar 2022 19:12:24 +0100 Subject: [PATCH] correctly modify option to `rmarkdown::github_document()` (#1306) conditionnaly --- R/rd-include-rmd.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/R/rd-include-rmd.R b/R/rd-include-rmd.R index bfe322d1..955abcf7 100644 --- a/R/rd-include-rmd.R +++ b/R/rd-include-rmd.R @@ -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) ), output_file = md_path, quiet = TRUE,