From 82f0b2755b6030277b158290d8fc7b42e04b77f3 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 4 Jan 2020 09:36:01 -0800 Subject: HTML writer: Add newlines to make slide show output more readable. --- src/Text/Pandoc/Writers/HTML.hs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index acd68300a..6b9856b10 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -682,9 +682,10 @@ blockToHtml opts (Div (ident, "section":dclasses, dkvs) -- revealjs doesn't like more than one level of section nesting: {- REMOVED && isNothing mbparentlevel -} then H5.section - else id) $ t <> if null innerSecs - then mempty - else nl opts <> innerContents + else id) $ nl opts <> t <> nl opts <> + if null innerSecs + then mempty + else innerContents <> nl opts else if writerSectionDivs opts || slide || (hident /= ident && not (T.null hident || T.null ident)) || (hclasses /= dclasses) || (hkvs /= dkvs) @@ -696,9 +697,10 @@ blockToHtml opts (Div (ident, "section":dclasses, dkvs) else innerContents <> nl opts else do t <- addAttrs opts attr header' - return $ t <> if null innerSecs - then mempty - else nl opts <> innerContents + return $ t <> + if null innerSecs + then mempty + else nl opts <> innerContents blockToHtml opts (Div attr@(ident, classes, kvs') bs) = do html5 <- gets stHtml5 slideVariant <- gets stSlideVariant -- cgit v1.2.3