Merge pull request #2 from Robert-M-Muench/patch-1

Delmiter was not taken into account for Headers
This commit is contained in:
Shakil Thakur 2016-10-20 22:34:44 -05:00 committed by GitHub
commit 3ba34b333a

View File

@ -442,7 +442,7 @@ function ftcsv.encode(inputTable, delimiter, options)
newHeaders[i] = headers[i]
end
end
output[1] = '"' .. table.concat(newHeaders, '","') .. '"\r\n'
output[1] = '"' .. table.concat(newHeaders, '"' .. delimiter .. '"') .. '"\r\n'
-- add each line by line.
for i, line in writer(inputTable, delimiter, headers) do