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:
parent
86453926b6
commit
9b664073d5
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue