aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2010-07-22 17:28:15 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2010-07-22 17:28:15 -0700
commit5fd13892634b70c83ac4873e97f983bd3e491638 (patch)
tree4a489dbdca6174cfb8119fa7604bf35eaadfab66 /src/Text
parenta3051b8acbb524b453726b80e6900704311d189d (diff)
downloadpandoc-5fd13892634b70c83ac4873e97f983bd3e491638.tar.gz
Slidy writer: Avoid spurious blank page.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs6
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