diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-28 06:00:51 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-28 06:00:51 +0000 |
commit | da9271c25871afbbb7e70a64893f799d5791cf97 (patch) | |
tree | b101a1d6f3d82f598e05013af0430d89344f3dfb /src/Text | |
parent | f04df62db11448da41d7b8daa280ac32459e1176 (diff) | |
download | pandoc-da9271c25871afbbb7e70a64893f799d5791cf97.tar.gz |
Removed unneeded 'try' from stringAnyCase. (Now it behaves
like 'string'.)
git-svn-id: https://pandoc.googlecode.com/svn/trunk@927 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 26a47b3d0..dc40589ce 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -292,8 +292,8 @@ enclosed start end parser = try $ -- | Parse string, case insensitive. stringAnyCase :: [Char] -> CharParser st String stringAnyCase [] = string "" -stringAnyCase (x:xs) = try $ do - firstChar <- choice [ char (toUpper x), char (toLower x) ] +stringAnyCase (x:xs) = do + firstChar <- char (toUpper x) <|> char (toLower x) rest <- stringAnyCase xs return (firstChar:rest) |