Refactored escapeChar so it doesn't need 'try'.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@939 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-08-28 07:24:56 +00:00
parent 06a5a0e235
commit 6906584f47

View file

@ -639,12 +639,12 @@ inline = choice [ str
, symbol
, ltSign ] <?> "inline"
escapedChar = try $ do
escapedChar = do
char '\\'
state <- getState
result <- if stateStrict state
then oneOf "\\`*_{}[]()>#+-.!~"
else satisfy (not . isAlphaNum)
result <- option '\\' $ if stateStrict state
then oneOf "\\`*_{}[]()>#+-.!~"
else satisfy (not . isAlphaNum)
return $ Str [result]
ltSign = do