diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-03 20:32:15 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-03 20:35:01 -0800 |
commit | c435e9cda7eb73cf4d8c446bb829079dddfaedbc (patch) | |
tree | cc52c835729c925e6b2e20cb345f05dac7f4fb43 /src/Text/Pandoc/Parsing.hs | |
parent | 56ff5e1845363dea91423b785f1c28cabed213bb (diff) | |
download | pandoc-c435e9cda7eb73cf4d8c446bb829079dddfaedbc.tar.gz |
Implemented `Ext_header_identifiers`, `Ext_implicit_header_references`.
Now by default pandoc will act as if link references have been defined
for all headers. So, you can do this:
# My header
Link to [My header].
Another link to [it][My header].
Closes #691.
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 777c07b4f..9a6ac1671 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -721,6 +721,7 @@ data ParserState = ParserState stateAuthors :: [[Inline]], -- ^ Authors of document stateDate :: [Inline], -- ^ Date of document stateHeaderTable :: [HeaderType], -- ^ Ordered list of header types used + stateHeaders :: [[Inline]], -- ^ List of headers (used for implicit ref links) stateNextExample :: Int, -- ^ Number of next example stateExamples :: M.Map String Int, -- ^ Map from example labels to numbers stateHasChapters :: Bool, -- ^ True if \chapter encountered @@ -747,6 +748,7 @@ defaultParserState = stateAuthors = [], stateDate = [], stateHeaderTable = [], + stateHeaders = [], stateNextExample = 1, stateExamples = M.empty, stateHasChapters = False, |