mirror of
https://github.com/circuithub/rel8.git
synced 2024-08-16 11:20:23 +03:00
Make Composite's text parser handle text containing double quotes (#304)
This commit is contained in:
parent
2d9b6abc74
commit
91e7a1bfab
@ -194,9 +194,10 @@ parseRow = parse $ do
|
||||
unquoted = A.takeWhile1 (A.notInClass ",\"()")
|
||||
quoted = A.char '"' *> contents <* A.char '"'
|
||||
where
|
||||
contents = fold <$> many (unquote <|> unescape)
|
||||
contents = fold <$> many (unquote <|> unescape <|> quote)
|
||||
where
|
||||
unquote = A.takeWhile1 (A.notInClass "\"\\")
|
||||
unescape = A.char '\\' *> do
|
||||
BS.singleton <$> do
|
||||
A.char '\\' <|> A.char '"'
|
||||
quote = "\"" <$ A.string "\"\""
|
||||
|
Loading…
Reference in New Issue
Block a user