reveal.js: ensure that pauses work even in title slides.

Closes #5819.
This commit is contained in:
John MacFarlane 2020-02-08 09:38:07 -08:00
parent f2f559003e
commit 5f0bd52221
2 changed files with 24 additions and 4 deletions

View file

@ -666,13 +666,15 @@ blockToHtml opts (Div (ident, "section":dclasses, dkvs)
let inDiv zs = RawBlock (Format "html") ("<div class=\""
<> fragmentClass <> "\">") :
(zs ++ [RawBlock (Format "html") "</div>"])
let breakOnPauses zs = case splitBy isPause zs of
[] -> []
y:ys -> y ++ concatMap inDiv ys
let (titleBlocks, innerSecs) =
if titleSlide
-- title slides have no content of their own
then break isSec xs
else case splitBy isPause xs of
[] -> ([],[])
(z:zs) -> ([],z ++ concatMap inDiv zs)
then let (as, bs) = break isSec xs
in (breakOnPauses as, bs)
else ([], breakOnPauses xs)
let secttag = if html5
then H5.section
else H.div

18
test/command/5819.md Normal file
View file

@ -0,0 +1,18 @@
```
% pandoc -t revealjs --slide-level=2
# Heading
one
. . .
two
^D
<section id="heading" class="title-slide slide level1">
<h1>Heading</h1>
<p>one</p>
<div class="fragment">
<p>two</p>
</div>
</section>
```