@@ -682,9 +682,10 @@ blockToHtml opts (Div (ident, "section":dclasses, dkvs)
682682 -- revealjs doesn't like more than one level of section nesting:
683683 {- REMOVED && isNothing mbparentlevel -}
684684 then H5.section
685− else id) $ t <> if null innerSecs
686− then mempty
687− else nl opts <> innerContents
685+ else id) $ nl opts <> t <> nl opts <>
686+ if null innerSecs
687+ then mempty
688+ else innerContents <> nl opts
688689 else if writerSectionDivs opts || slide ||
689690 (hident /= ident && not (T.null hident || T.null ident)) ||
690691 (hclasses /= dclasses) || (hkvs /= dkvs)
@@ -696,9 +697,10 @@ blockToHtml opts (Div (ident, "section":dclasses, dkvs)
696697 else innerContents <> nl opts
697698 else do
698699 t <- addAttrs opts attr header'
699− return $ t <> if null innerSecs
700− then mempty
701− else nl opts <> innerContents
700+ return $ t <>
701+ if null innerSecs
702+ then mempty
703+ else nl opts <> innerContents
702704blockToHtml opts (Div attr@(ident, classes, kvs') bs) = do
703705 html5 <- gets stHtml5
704706 slideVariant <- gets stSlideVariant