mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-26 02:06:32 +00:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user