mirror of
https://github.com/geoffleyland/lua-csv.git
synced 2024-11-23 01:34:19 +00:00
handle blank lines more correctly
This commit is contained in:
parent
ac033b3075
commit
c9988c8b93
@ -285,7 +285,8 @@ local function separated_values_iterator(file, parameters)
|
||||
elseif parameters.header and not header then
|
||||
header = fields
|
||||
else
|
||||
if fields[1] ~= "" or fields[2] then -- ignore blank lines
|
||||
local k, v = next(fields)
|
||||
if v ~= "" or field_count > 1 then -- ignore blank lines
|
||||
coroutine.yield(fields, starts)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user