diff options
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 0608701ed..a393df6d0 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -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 |