git.iko.soy/typeable/pandoc
on master help sign in
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

commitda9271c25871afbbb7e70a64893f799d5791cf97 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateTue 28 Aug 2007, 06:00 (19 years ago) parentf04df62
1 file changed+2−2
src/Text/Pandoc/Shared.hs+2−2
src/Text/Pandoc/Shared.hs+2−2
@@ -292,8 +292,8 @@ enclosed start end parser = try $
292292-- | Parse string, case insensitive.
293293stringAnyCase :: [Char] -> CharParser st String
294294stringAnyCase [] = string ""
295−stringAnyCase (x:xs) = try $ do
296− firstChar <- choice [ char (toUpper x), char (toLower x) ]
295+stringAnyCase (x:xs) = do
296+ firstChar <- char (toUpper x) <|> char (toLower x)
297297 rest <- stringAnyCase xs
298298 return (firstChar:rest)
299299