Use `pandoc_variable_arg` to create argument to pandoc CLI
diff --git a/DESCRIPTION b/DESCRIPTION
index 5a8a41b..4c9636b 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -31,7 +31,7 @@
Depends:
R (>= 3.0)
Imports:
- rmarkdown (>= 1.0)
+ rmarkdown (>= 1.7)
Suggests:
bslib,
testthat (>= 3.0.0)
diff --git a/R/revealjs_presentation.R b/R/revealjs_presentation.R
index b345c51..2967bf2 100644
--- a/R/revealjs_presentation.R
+++ b/R/revealjs_presentation.R
@@ -118,18 +118,18 @@
theme <- "black"
}
if (theme %in% c("blood", "moon", "night", "black")) {
- args <- c(args, "--variable", "theme-dark")
+ args <- c(args, pandoc_variable_arg("theme-dark"))
}
- args <- c(args, "--variable", paste("theme=", theme, sep = ""))
+ args <- c(args, pandoc_variable_arg("theme=", theme))
# transition
transition <- match.arg(transition, revealjs_transitions())
- args <- c(args, "--variable", paste("transition=", transition, sep = ""))
+ args <- c(args, pandoc_variable_arg("transition", transition))
# background_transition
background_transition <- match.arg(background_transition, revealjs_transitions())
- args <- c(args, "--variable", paste("backgroundTransition=", background_transition, sep = ""))
+ args <- c(args, pandoc_variable_arg("backgroundTransition", background_transition))
# use history
args <- c(args, pandoc_variable_arg("history", "true"))
@@ -241,7 +241,7 @@
} else {
revealjs_path <- pandoc_path_arg(revealjs_path)
}
- args <- c(args, "--variable", paste0("revealjs-url=", revealjs_path))
+ args <- c(args, pandoc_variable_arg("revealjs-url", revealjs_path))
# highlight
args <- c(args, pandoc_highlight_args(highlight, default = "pygments"))