From 5fd13892634b70c83ac4873e97f983bd3e491638 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 22 Jul 2010 17:28:15 -0700 Subject: Slidy writer: Avoid spurious blank page. --- src/Text/Pandoc/Writers/HTML.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 98e3045d3..09af03f4e 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -112,10 +112,14 @@ pandocToHtml opts (Pandoc (Meta title' authors' date') blocks) = do Header 1 ys : cutUp xs cutUp (x:xs) = x : cutUp xs cutUp [] = [] + let preamble = case blocks of + (HorizontalRule : _) -> [] + (Header 1 _ : _) -> [] + _ -> [RawHtml "
\n"] blocks' <- liftM toHtmlFromList $ case writerSlideVariant opts of SlidySlides -> mapM (blockToHtml opts) $ - RawHtml "
\n" : + preamble ++ cutUp blocks ++ [RawHtml "
"] _ -> mapM (elementToHtml opts) sects -- cgit v1.2.3