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:
parent
06a5a0e235
commit
6906584f47
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue