Fix quoting of default variable in template (#91)
* Revert "don't quote reveal options in template". This reverts commit 633c05f47dca23c48382804bd8d0cf9d55d018bb fixing #72
* Only quote specific option that can be character or else like slideNumber https://revealjs.com/slide-numbers/
diff --git a/R/revealjs_presentation.R b/R/revealjs_presentation.R
index 73dfdbd..3ca3a57 100644
--- a/R/revealjs_presentation.R
+++ b/R/revealjs_presentation.R
@@ -147,8 +147,13 @@
add_reveal_option <- function(option, value) {
if (is.logical(value))
value <- jsbool(value)
- else if (is.character(value))
- value <- paste0("'", value, "'")
+ else if (is.character(value)) {
+ # Add quotes around some config that can be several type
+ # e.g slideNumber = true or slideNumber = 'c/t'
+ if (option %in% c("slideNumber")) {
+ value <- paste0("'", value, "'")
+ }
+ }
args <<- c(args, pandoc_variable_arg(option, value))
}