Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for NewPage #9

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Text/Pandoc/Builder.hs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ module Text.Pandoc.Builder ( module Text.Pandoc.Definition
, definitionList
, header
, headerWith
, newPage
, horizontalRule
, table
, simpleTable
Expand Down Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions Text/Pandoc/Definition.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down