aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-03-14 23:32:35 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-03-14 23:32:35 -0700
commit967c13560e26dcca60261737a8f30bf7297ea4ea (patch)
tree1e50927a4471427e83ffa7e07006c08b417c946f
parent3b962a52776b29ddb16bcc690e9d70e78bba6baa (diff)
downloadpandoc-967c13560e26dcca60261737a8f30bf7297ea4ea.tar.gz
Really fix #1394.
This closes #1394, which actually wasn't fixed by the earlier commit. This ensures that lists in speaker notes don't add "fragment" classes, which can cause additional keypresses to be needed to advance a slide.
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index cadac16a0..53dc931cc 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -446,13 +446,14 @@ blockToHtml opts (Para lst) = do
contents <- inlineListToHtml opts lst
return $ H.p contents
blockToHtml opts (Div attr@(_,classes,_) bs) = do
- contents <- blockListToHtml opts bs
+ let speakerNotes = "notes" `elem` classes
+ -- we don't want incremental output inside speaker notes, see #1394
+ let opts' = if speakerNotes then opts{ writerIncremental = False } else opts
+ contents <- blockListToHtml opts' bs
let contents' = nl opts >> contents >> nl opts
return $
- if "notes" `elem` classes
- then let opts' = opts{ writerIncremental = False } in
- -- we don't want incremental output inside speaker notes
- case writerSlideVariant opts of
+ if speakerNotes
+ then case writerSlideVariant opts of
RevealJsSlides -> addAttrs opts' attr $ H5.aside $ contents'
NoSlides -> addAttrs opts' attr $ H.div $ contents'
_ -> mempty