aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/CSV.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/CSV.hs b/src/Text/Pandoc/CSV.hs
index d9bc10200..99324ee2e 100644
--- a/src/Text/Pandoc/CSV.hs
+++ b/src/Text/Pandoc/CSV.hs
@@ -46,10 +46,10 @@ pCSV opts =
(pCSVRow opts `sepEndBy` endline) <* (spaces *> eof)
pCSVRow :: CSVOptions -> Parser [Text]
-pCSVRow opts = notFollowedBy blank >> pCSVCell opts `sepBy` pCSVDelim opts
-
-blank :: Parser ()
-blank = try $ spaces >> (() <$ endline <|> eof)
+pCSVRow opts = do
+ x <- pCSVCell opts
+ xs <- (if T.null x then many1 else many) $ pCSVDelim opts *> pCSVCell opts
+ return (x:xs)
pCSVCell :: CSVOptions -> Parser Text
pCSVCell opts = pCSVQuotedCell opts <|> pCSVUnquotedCell opts