git.iko.soy/typeable/pandoc
on master help sign in
reveal.js: ensure that pauses work even in title slides.

Closes #5819.

commit5f0bd5222169129cc3474d0284a0f1ecb702a770 authorJohn MacFarlane <jgm@berkeley.edu> dateSat 8 Feb 2020, 09:38 (7 years ago) parentf2f5590
2 files changed+24−4
src/Text/Pandoc/Writers/HTML.hs+6−4 test/command/5819.md+18
src/Text/Pandoc/Writers/HTML.hs+6−4
@@ -666,13 +666,15 @@ blockToHtml opts (Div (ident, "section":dclasses, dkvs)
666666 let inDiv zs = RawBlock (Format "html") ("<div class=\""
667667 <> fragmentClass <> "\">") :
668668 (zs ++ [RawBlock (Format "html") "</div>"])
669+ let breakOnPauses zs = case splitBy isPause zs of
670+ [] -> []
671+ y:ys -> y ++ concatMap inDiv ys
669672 let (titleBlocks, innerSecs) =
670673 if titleSlide
671674 -- title slides have no content of their own
672− then break isSec xs
673− else case splitBy isPause xs of
674− [] -> ([],[])
675− (z:zs) -> ([],z ++ concatMap inDiv zs)
675+ then let (as, bs) = break isSec xs
676+ in (breakOnPauses as, bs)
677+ else ([], breakOnPauses xs)
676678 let secttag = if html5
677679 then H5.section
678680 else H.div
test/command/5819.mdnew file+18
@@ -0,0 +1,18 @@
1+```
2+% pandoc -t revealjs --slide-level=2
3+# Heading
4+
5+one
6+
7+. . .
8+
9+two
10+^D
11+<section id="heading" class="title-slide slide level1">
12+<h1>Heading</h1>
13+<p>one</p>
14+<div class="fragment">
15+<p>two</p>
16+</div>
17+</section>
18+```