diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 9a6ac1671..3aa013fdc 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -726,7 +726,8 @@ data ParserState = ParserState stateExamples :: M.Map String Int, -- ^ Map from example labels to numbers stateHasChapters :: Bool, -- ^ True if \chapter encountered stateMacros :: [Macro], -- ^ List of macros defined so far - stateRstDefaultRole :: String -- ^ Current rST default interpreted text role + stateRstDefaultRole :: String, -- ^ Current rST default interpreted text role + stateWarnings :: [String] -- ^ Warnings generated by the parser } instance Default ParserState where @@ -753,7 +754,8 @@ defaultParserState = stateExamples = M.empty, stateHasChapters = False, stateMacros = [], - stateRstDefaultRole = "title-reference"} + stateRstDefaultRole = "title-reference", + stateWarnings = []} getOption :: (ReaderOptions -> a) -> Parser s ParserState a getOption f = (f . stateOptions) `fmap` getState