diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-06-23 09:54:14 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-06-23 09:54:14 -0700 |
commit | 235cdea629de95f5a6c40a043e8dff6b19a46d3d (patch) | |
tree | 12bddae07c00d5c738394c9b565586c5da4d1312 /src/Text/Pandoc/Writers | |
parent | 7dcf7273828a26f2f79d447ea2662ff6ef165903 (diff) | |
download | pandoc-235cdea629de95f5a6c40a043e8dff6b19a46d3d.tar.gz |
reveal.js writer: Go back to setting boolean values for variables.
In a previous commit we used strings because boolean False
wouldn't render as `false`. This is changed in the dev
version ofdoctemplates, so we can go back to the more
straightforward approach.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 4d513df3b..b99b1a413 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -317,10 +317,6 @@ pandocToHtml opts (Pandoc meta blocks) = do | otherwise -> mempty Nothing -> mempty let mCss :: Maybe [Text] = lookupContext "css" metadata - let true :: Text - true = "true" - let false :: Text - false = "false" let context = (if stHighlighting st then case writerHighlightStyle opts of Just sty -> defField "highlighting-css" @@ -351,43 +347,43 @@ pandocToHtml opts (Pandoc meta blocks) = do (if slideVariant == RevealJsSlides then -- set boolean options explicitly, since -- template can't distinguish False/undefined - defField "controls" true . - defField "controlsTutorial" true . + defField "controls" True . + defField "controlsTutorial" True . defField "controlsLayout" ("bottom-right" :: Text) . defField "controlsBackArrows" ("faded" :: Text) . - defField "progress" true . - defField "slideNumber" false . + defField "progress" True . + defField "slideNumber" False . defField "showSlideNumber" ("all" :: Text) . - defField "hashOneBasedIndex" false . - defField "hash" false . - defField "respondToHashChanges" true . - defField "history" false . - defField "keyboard" true . - defField "overview" true . - defField "disableLayout" false . - defField "center" true . - defField "touch" true . - defField "loop" false . - defField "rtl" false . + defField "hashOneBasedIndex" False . + defField "hash" False . + defField "respondToHashChanges" True . + defField "history" False . + defField "keyboard" True . + defField "overview" True . + defField "disableLayout" False . + defField "center" True . + defField "touch" True . + defField "loop" False . + defField "rtl" False . defField "navigationMode" ("default" :: Text) . - defField "shuffle" false . - defField "fragments" true . - defField "fragmentInURL" true . - defField "embedded" false . - defField "help" true . - defField "pause" true . - defField "showNotes" false . + defField "shuffle" False . + defField "fragments" True . + defField "fragmentInURL" True . + defField "embedded" False . + defField "help" True . + defField "pause" True . + defField "showNotes" False . defField "autoPlayMedia" ("null" :: Text) . defField "preloadIframes" ("null" :: Text) . defField "autoSlide" ("0" :: Text) . - defField "autoSlideStoppable" true . + defField "autoSlideStoppable" True . defField "autoSlideMethod" ("null" :: Text) . defField "defaultTiming" ("null" :: Text) . - defField "mouseWheel" false . + defField "mouseWheel" False . defField "display" ("block" :: Text) . - defField "hideInactiveCursor" true . + defField "hideInactiveCursor" True . defField "hideCursorTime" ("5000" :: Text) . - defField "previewLinks" false . + defField "previewLinks" False . defField "transition" ("slide" :: Text) . defField "transitionSpeed" ("default" :: Text) . defField "backgroundTransition" ("fade" :: Text) . |