From b2f307498819247b7f2955373fe72e895948b494 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 8 Sep 2020 18:44:13 -0700 Subject: Parsing: add stateInNote and stateLastNoteNumber to ParserState. These will be used to populate note numbers for citations. --- src/Text/Pandoc/Parsing.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Text') 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, -- cgit v1.2.3