diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 06c1b89c3..f1df22c4f 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -57,6 +57,7 @@ module Text.Pandoc.Shared ( NoteTable, defaultParserState, nullBlock, + failIfStrict, escaped, -- * Native format prettyprinting prettyPandoc, @@ -184,6 +185,12 @@ nullBlock = do anyChar return Null +-- | Fail if reader is in strict markdown syntax mode. +failIfStrict :: GenParser Char ParserState () +failIfStrict = do + state <- getState + if stateStrict state then fail "Strict mode" else return () + -- | Parses backslash, then applies character parser. escaped :: GenParser Char st Char -- ^ Parser for character to escape -> GenParser Char st Inline |