diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-28 07:24:56 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-28 07:24:56 +0000 |
commit | 6906584f47d382e6a61dbdd0220b395664f81619 (patch) | |
tree | 52338a613d5c432c7b9f700e92d3bed219f1af27 /src/Text/Pandoc | |
parent | 06a5a0e235dec1eeb5873a6304dd7045ff18b069 (diff) | |
download | pandoc-6906584f47d382e6a61dbdd0220b395664f81619.tar.gz |
Refactored escapeChar so it doesn't need 'try'.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@939 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 3dda843bc..1af2688f9 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -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 |