aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-08-28 07:24:56 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-08-28 07:24:56 +0000
commit6906584f47d382e6a61dbdd0220b395664f81619 (patch)
tree52338a613d5c432c7b9f700e92d3bed219f1af27
parent06a5a0e235dec1eeb5873a6304dd7045ff18b069 (diff)
downloadpandoc-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
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs8
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