diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-10-29 22:45:52 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-09 09:30:05 -0800 |
commit | d599c4cdabd0d71fd9d27161c949b5e1e692436d (patch) | |
tree | 96b6130be929282f85d0261bbb0e0ef37e4e43ff /src/Text/Pandoc/Parsing.hs | |
parent | 7a40fa8c08996cb94e7ff3cfafd8ede84972ce70 (diff) | |
download | pandoc-d599c4cdabd0d71fd9d27161c949b5e1e692436d.tar.gz |
Added Attr field to Header.
Previously header ids were autogenerated by the writers.
Now they are generated (unless supplied explicitly) in the
markdown parser, if the `header_identifiers` extension is
selected.
In addition, the textile reader now supports id attributes on
headers.
Diffstat (limited to 'src/Text/Pandoc/Parsing.hs')
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 629814e4d..6277020a5 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -723,6 +723,7 @@ data ParserState = ParserState stateDate :: [Inline], -- ^ Date of document stateHeaderTable :: [HeaderType], -- ^ Ordered list of header types used stateHeaders :: [[Inline]], -- ^ List of headers (used for implicit ref links) + stateIdentifiers :: [String], -- ^ List of header identifiers used stateNextExample :: Int, -- ^ Number of next example stateExamples :: M.Map String Int, -- ^ Map from example labels to numbers stateHasChapters :: Bool, -- ^ True if \chapter encountered @@ -751,6 +752,7 @@ defaultParserState = stateDate = [], stateHeaderTable = [], stateHeaders = [], + stateIdentifiers = [], stateNextExample = 1, stateExamples = M.empty, stateHasChapters = False, |