-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
reveal.js: Explicitly setting boolean options to false
fails
#7402
Comments
The root problem is that the template engine (doctemplates) wasn't designed with boolean values in mind. See jgm/doctemplates#16 -- ultimately we need to sort this out there. |
false
fails
One solution would be to
This is kind of ugly, but more straightforward than the present approach. |
Of course, that approach would break with the workaround above. |
Another possibility would be to add a "pipe" to doctemplates that converts a boolean value to the string |
I guess this makes sense until underlying issue jgm/doctemplates#16 is resolved, thus see #7403. |
Previously, `$if(foo)$` evaluated to false iff `foo` would render as the empty string. This forced us to render a boolean False value as an empty string, rather than `false`. And this has caused various problems with templates (#16, jgm/pandoc#7402). This commit changes two things: - Now, boolean False values render as `false` -- just as True values render as `true`. - Conditionals are now sensitive to booleans, so `$if(foo)$` evaluates to false when `foo` is a boolean False value, even though it would render as the nonempty string `false`. The README on conditionals has been updated accordingly.
I've pushed commit 7dcf727 |
0.10.0.1 * Don't rely on aeson Object being implemented as a HashMap. This change is needed for doctemplates to compile against aeson 2.0.0.0. 0.10 * Change rendering and conditional behavior with booleans. Previously, $if(foo)$ evaluated to false iff foo would render as the empty string. This forced us to render a boolean False value as an empty string, rather than false. And this has caused various problems with templates (#16, jgm/pandoc#7402). Now, boolean False values render as false -- just as True values render as true. And conditionals are now sensitive to booleans, so $if(foo)$ evaluates to false when foo is a boolean False value, even though it would render as the nonempty string false.
Problem
Since Pandoc 2.14.0.3 (more specifically 14b2eb2), all reveal.js config options are explicitly set to their default values.
While leaving the default of a boolean variable untouched (1) or flipping it to
true
(2) works fine, setting it tofalse
(3) fails.1
2
3
Workaround
Explicitly setting the boolean
false
as a string works:Pandoc version
2.14.0.3
The text was updated successfully, but these errors were encountered: