Permalink
Browse files

Added extra field for Attr to Header.

  • Loading branch information...
1 parent 177b00c commit 81dcfd2b1c8349fd52376bb5105254cc08a0af61 John MacFarlane committed Nov 1, 2012
Showing with 6 additions and 2 deletions.
  1. +5 −1 Text/Pandoc/Builder.hs
  2. +1 −1 Text/Pandoc/Definition.hs
View
6 Text/Pandoc/Builder.hs
@@ -138,6 +138,7 @@ module Text.Pandoc.Builder ( module Text.Pandoc.Definition
, orderedList
, definitionList
, header
+ , headerWith
, horizontalRule
, table
, simpleTable
@@ -371,7 +372,10 @@ definitionList = singleton . DefinitionList . map (toList *** map toList)
header :: Int -- ^ Level
-> Inlines
-> Blocks
-header level = singleton . Header level . toList
+header = headerWith nullAttr
+
+headerWith :: Attr -> Int -> Inlines -> Blocks
+headerWith attr level = singleton . Header level attr . toList
horizontalRule :: Blocks
horizontalRule = singleton HorizontalRule
View
2 Text/Pandoc/Definition.hs
@@ -105,7 +105,7 @@ data Block
-- Each list item is a pair consisting of a
-- term (a list of inlines) and one or more
-- definitions (each a list of blocks)
- | Header Int [Inline] -- ^ Header - level (integer) and text (inlines)
+ | Header Int Attr [Inline] -- ^ Header - level (integer) and text (inlines)
| HorizontalRule -- ^ Horizontal rule
| Table [Inline] [Alignment] [Double] [TableCell] [[TableCell]] -- ^ Table,
-- with caption, column alignments,

0 comments on commit 81dcfd2

Please sign in to comment.