aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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