From 4aa6b78bb83f85714055fafd72240dec79a95a03 Mon Sep 17 00:00:00 2001 From: David Griffith Date: Thu, 21 Mar 2013 02:23:05 -0700 Subject: [PATCH] Adding support for NewPage --- Text/Pandoc/Builder.hs | 4 ++++ Text/Pandoc/Definition.hs | 1 + 2 files changed, 5 insertions(+) diff --git a/Text/Pandoc/Builder.hs b/Text/Pandoc/Builder.hs index 466f30a..6a74950 100644 --- a/Text/Pandoc/Builder.hs +++ b/Text/Pandoc/Builder.hs @@ -139,6 +139,7 @@ module Text.Pandoc.Builder ( module Text.Pandoc.Definition , definitionList , header , headerWith + , newPage , horizontalRule , table , simpleTable @@ -377,6 +378,9 @@ header = headerWith nullAttr headerWith :: Attr -> Int -> Inlines -> Blocks headerWith attr level = singleton . Header level attr . toList +newPage :: Blocks +newPage = singleton NewPage + horizontalRule :: Blocks horizontalRule = singleton HorizontalRule diff --git a/Text/Pandoc/Definition.hs b/Text/Pandoc/Definition.hs index 9d6ad81..978f46b 100644 --- a/Text/Pandoc/Definition.hs +++ b/Text/Pandoc/Definition.hs @@ -106,6 +106,7 @@ data Block -- term (a list of inlines) and one or more -- definitions (each a list of blocks) | Header Int Attr [Inline] -- ^ Header - level (integer) and text (inlines) + | NewPage -- ^ Explicit pagebreak | HorizontalRule -- ^ Horizontal rule | Table [Inline] [Alignment] [Double] [TableCell] [[TableCell]] -- ^ Table, -- with caption, column alignments,