handle blank lines more correctly

This commit is contained in:
Geoff Leyland 2014-01-29 13:28:47 +13:00
parent ac033b3075
commit c9988c8b93

View File

@ -285,7 +285,8 @@ local function separated_values_iterator(file, parameters)
elseif parameters.header and not header then elseif parameters.header and not header then
header = fields header = fields
else 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) coroutine.yield(fields, starts)
end end
end end