From da9271c25871afbbb7e70a64893f799d5791cf97 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Tue, 28 Aug 2007 06:00:51 +0000 Subject: 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 --- src/Text/Pandoc/Shared.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc') 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) -- cgit v1.2.3