Moved failIfStrict from Markdown reader to

Text.Pandoc.Shared.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@750 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-07-21 21:55:19 +00:00
parent 86453926b6
commit 9b664073d5

View file

@ -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