Bibtex parser: avoid noneOf.
This commit is contained in:
parent
f2749ba6cd
commit
2f9b684b3a
1 changed files with 2 additions and 2 deletions
|
@ -601,7 +601,7 @@ inBraces :: BibParser Text
|
|||
inBraces = do
|
||||
char '{'
|
||||
res <- manyTill
|
||||
( (T.pack <$> many1 (noneOf "{}\\"))
|
||||
( take1WhileP (\c -> c /= '{' && c /= '}' && c /= '\\')
|
||||
<|> (char '\\' >> ( (char '{' >> return "\\{")
|
||||
<|> (char '}' >> return "\\}")
|
||||
<|> return "\\"))
|
||||
|
@ -616,7 +616,7 @@ inQuotes :: BibParser Text
|
|||
inQuotes = do
|
||||
char '"'
|
||||
T.concat <$> manyTill
|
||||
( (T.pack <$> many1 (noneOf "\"\\{"))
|
||||
( take1WhileP (\c -> c /= '{' && c /= '"' && c /= '\\')
|
||||
<|> (char '\\' >> T.cons '\\' . T.singleton <$> anyChar)
|
||||
<|> braced <$> inBraces
|
||||
) (char '"')
|
||||
|
|
Loading…
Add table
Reference in a new issue