git.iko.soy/typeable/pandoc
on master help sign in
Refactored escapeChar so it doesn't need 'try'.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@939 788f1e2b-df1e-0410-8736-df70ead52e1b

commit6906584f47d382e6a61dbdd0220b395664f81619 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateTue 28 Aug 2007, 07:24 (19 years ago) parent06a5a0e
1 file changed+4−4
src/Text/Pandoc/Readers/Markdown.hs+4−4
src/Text/Pandoc/Readers/Markdown.hs+4−4
@@ -639,12 +639,12 @@ inline = choice [ str
639639 , symbol
640640 , ltSign ] <?> "inline"
641641
642−escapedChar = try $ do
642+escapedChar = do
643643 char '\\'
644644 state <- getState
645− result <- if stateStrict state
646− then oneOf "\\`*_{}[]()>#+-.!~"
647− else satisfy (not . isAlphaNum)
645+ result <- option '\\' $ if stateStrict state
646+ then oneOf "\\`*_{}[]()>#+-.!~"
647+ else satisfy (not . isAlphaNum)
648648 return $ Str [result]
649649
650650ltSign = do