diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-07-18 23:05:48 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-07-18 23:06:22 -0700 |
commit | 465a4a66993eba9017faa950a9737ae1c5f68786 (patch) | |
tree | 59a185c0ff3b69c99e6578fa89240d39354f7fe6 /src/Text/Pandoc/Writers/HTML.hs | |
parent | 88281fa2ea323392a5400e706ad49de62964bf97 (diff) | |
download | pandoc-465a4a66993eba9017faa950a9737ae1c5f68786.tar.gz |
Slidy writer: create new slide at every level 1 header.
Diffstat (limited to 'src/Text/Pandoc/Writers/HTML.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 5 |
1 files changed, 4 insertions, 1 deletions
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 "</div>\n<div class=\"slide\">\n" : + let cutUp (HorizontalRule : Header 1 ys : xs) = cutUp (Header 1 ys : xs) + cutUp (HorizontalRule : xs) = RawHtml "</div>\n<div class=\"slide\">\n" : cutUp xs + cutUp (Header 1 ys : xs) = RawHtml ("</div>\n<div class=\"slide title\">\n") : + Header 1 ys : cutUp xs cutUp (x:xs) = x : cutUp xs cutUp [] = [] blocks' <- liftM toHtmlFromList $ |