aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-09-08 18:44:13 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2020-09-21 10:10:30 -0700
commitb2f307498819247b7f2955373fe72e895948b494 (patch)
tree0f436b517eac5a0288e0f49ba2f56df39581c16e /src/Text
parent39f357027aafeed5f20f350db0a892b9cc3efd43 (diff)
downloadpandoc-b2f307498819247b7f2955373fe72e895948b494.tar.gz
Parsing: add stateInNote and stateLastNoteNumber to ParserState.
These will be used to populate note numbers for citations.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Parsing.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs
index 953851966..7acdd346f 100644
--- a/src/Text/Pandoc/Parsing.hs
+++ b/src/Text/Pandoc/Parsing.hs
@@ -1136,6 +1136,8 @@ data ParserState = ParserState
stateNotes :: NoteTable, -- ^ List of notes (raw bodies)
stateNotes' :: NoteTable', -- ^ List of notes (parsed bodies)
stateNoteRefs :: Set.Set Text, -- ^ List of note references used
+ stateInNote :: Bool, -- ^ True if parsing note contents
+ stateLastNoteNumber :: Int, -- ^ Last note number for citations
stateMeta :: Meta, -- ^ Document metadata
stateMeta' :: F Meta, -- ^ Document metadata
stateCitations :: M.Map Text Text, -- ^ RST-style citations
@@ -1247,6 +1249,8 @@ defaultParserState =
stateNotes = [],
stateNotes' = M.empty,
stateNoteRefs = Set.empty,
+ stateInNote = False,
+ stateLastNoteNumber = 0,
stateMeta = nullMeta,
stateMeta' = return nullMeta,
stateCitations = M.empty,