From 465a4a66993eba9017faa950a9737ae1c5f68786 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 18 Jul 2010 23:05:48 -0700 Subject: Slidy writer: create new slide at every level 1 header. --- src/Text/Pandoc/Writers/HTML.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index a0366006d..98e3045d3 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -105,8 +105,11 @@ pandocToHtml opts (Pandoc (Meta title' authors' date') blocks) = do toc <- if writerTableOfContents opts then tableOfContents opts sects else return Nothing - let cutUp (HorizontalRule : xs) = RawHtml "\n
\n" : + let cutUp (HorizontalRule : Header 1 ys : xs) = cutUp (Header 1 ys : xs) + cutUp (HorizontalRule : xs) = RawHtml "
\n
\n" : cutUp xs + cutUp (Header 1 ys : xs) = RawHtml ("
\n
\n") : + Header 1 ys : cutUp xs cutUp (x:xs) = x : cutUp xs cutUp [] = [] blocks' <- liftM toHtmlFromList $ -- cgit v1.2.3