rstudio / revealjs

R Markdown Format for reveal.js Presentations
Other
327 stars 85 forks source link

Fix/quote default variable #91

Closed cderv closed 3 years ago

cderv commented 3 years ago

Following the fix 633c05f47dca23c48382804bd8d0cf9d55d018bb for #72 , there was an issue with Pandoc 2.14.0.3 and later because of a change in the way variables are set (see #90)

As Pandoc is setting some variables directly with default value, if required the quotes needs to be in the template directly.

So this PR is another way to fix #72. Basically, the double quotes are introduced because of https://github.com/rstudio/revealjs/blob/6b272a7e188067c19bacac6b3f69713b8f25cba5/R/revealjs_presentation.R#L147-L153 Any character value option will be quoted by R before being passed to Pandoc as variable. This is only useful for some options that can be either quoted (as string e.g slideNumber = 'c/t') or unquoted (as boolean e.g slideNumber = true.)

We only add the quotes for known options that needs both.