git.iko.soy/typeable/pandoc
on master help sign in
Refactored escapeChar so it doesn't need 'try'.
6906584fiddlosopher
src/Text/Pandoc/Readers/Markdown.hs+4−4
@@ -639,12 +639,12 @@ inline = choice [ str
639 , symbol
639 , symbol
640 , ltSign ] <?> "inline"
640 , ltSign ] <?> "inline"
641
641
642−escapedChar = try $ do
642+escapedChar = do
643 char '\\'
643 char '\\'
644 state <- getState
644 state <- getState
645− result <- if stateStrict state
645+ result <- option '\\' $ if stateStrict state
646− then oneOf "\\`*_{}[]()>#+-.!~"
646+ then oneOf "\\`*_{}[]()>#+-.!~"
647− else satisfy (not . isAlphaNum)
647+ else satisfy (not . isAlphaNum)
648 return $ Str [result]
648 return $ Str [result]
649
649
650ltSign = do
650ltSign = do