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
This commit is contained in:
fiddlosopher
2007-08-28 06:00:51 +00:00
parent f04df62db1
commit da9271c258
+2 -2
View File
@@ -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)