mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 00:15:44 +00:00
Added stateWarnings.
It is not connected to anything yet.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user