diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-07-22 17:28:15 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-07-22 17:28:15 -0700 |
commit | 5fd13892634b70c83ac4873e97f983bd3e491638 (patch) | |
tree | 4a489dbdca6174cfb8119fa7604bf35eaadfab66 /src/Text | |
parent | a3051b8acbb524b453726b80e6900704311d189d (diff) | |
download | pandoc-5fd13892634b70c83ac4873e97f983bd3e491638.tar.gz |
Slidy writer: Avoid spurious blank page.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 6 |
1 files changed, 5 insertions, 1 deletions
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 "<div class=\"slide\">\n"] blocks' <- liftM toHtmlFromList $ case writerSlideVariant opts of SlidySlides -> mapM (blockToHtml opts) $ - RawHtml "<div class=\"slide\">\n" : + preamble ++ cutUp blocks ++ [RawHtml "</div>"] _ -> mapM (elementToHtml opts) sects |