mirror of
https://github.com/FourierTransformer/ftcsv.git
synced 2024-11-19 19:54:23 +00:00
Delmiter was not taken into account for Headers
Headers were always separated with "," char even when other delimiter was given.
This commit is contained in:
parent
ee24dcd9a6
commit
2e0d8a6284
@ -442,7 +442,7 @@ function ftcsv.encode(inputTable, delimiter, options)
|
|||||||
newHeaders[i] = headers[i]
|
newHeaders[i] = headers[i]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
output[1] = '"' .. table.concat(newHeaders, '","') .. '"\r\n'
|
output[1] = '"' .. table.concat(newHeaders, '"' .. delimiter .. '"') .. '"\r\n'
|
||||||
|
|
||||||
-- add each line by line.
|
-- add each line by line.
|
||||||
for i, line in writer(inputTable, delimiter, headers) do
|
for i, line in writer(inputTable, delimiter, headers) do
|
||||||
|
Loading…
Reference in New Issue
Block a user