git.iko.soy/typeable/pandoc
on master help sign in
Parsing: add stateInNote and stateLastNoteNumber to ParserState.

These will be used to populate note numbers for citations.

commitb2f307498819247b7f2955373fe72e895948b494 authorJohn MacFarlane <jgm@berkeley.edu> dateTue 8 Sep 2020, 18:44 (6 years ago) parent39f3570
1 file changed+4
src/Text/Pandoc/Parsing.hs+4
src/Text/Pandoc/Parsing.hs+4
@@ -1136,6 +1136,8 @@ data ParserState = ParserState
11361136 stateNotes :: NoteTable, -- ^ List of notes (raw bodies)
11371137 stateNotes' :: NoteTable', -- ^ List of notes (parsed bodies)
11381138 stateNoteRefs :: Set.Set Text, -- ^ List of note references used
1139+ stateInNote :: Bool, -- ^ True if parsing note contents
1140+ stateLastNoteNumber :: Int, -- ^ Last note number for citations
11391141 stateMeta :: Meta, -- ^ Document metadata
11401142 stateMeta' :: F Meta, -- ^ Document metadata
11411143 stateCitations :: M.Map Text Text, -- ^ RST-style citations
@@ -1247,6 +1249,8 @@ defaultParserState =
12471249 stateNotes = [],
12481250 stateNotes' = M.empty,
12491251 stateNoteRefs = Set.empty,
1252+ stateInNote = False,
1253+ stateLastNoteNumber = 0,
12501254 stateMeta = nullMeta,
12511255 stateMeta' = return nullMeta,
12521256 stateCitations = M.empty,