diff options
-rw-r--r-- | README | 8 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 5 |
2 files changed, 7 insertions, 6 deletions
@@ -1349,11 +1349,9 @@ directory. Using Slidy ----------- -If you use Slidy, things work a bit differently. Instead of -automatically chopping the document into sections on the level-1 -headers, you can choose how to segment the document into slides -yourself. Just insert a horizontal rule at each slide boundary. -For example: +If you use Slidy, things work a bit differently. As with S5, a new slide +will be created at every level 1 header. But you can also force a new +slide by inserting a horizontal rule. For example: % Eating Habits % John Doe 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 $ |