csv
csv copied to clipboard
Bug with single column csv text not ending a trailing line break
Hi, it seems there is a bug where single column csv content that does not end with a line break gets the last "cell" value deleted when parsed. I have created a PR where I updated the tests to expose the issue, but do not have enough knowledge to fix the issue. I have tried updating the code at https://github.com/vanillaes/csv/blob/main/index.js#L104-L107 to honour flushing of the last value using if (ctx.value !== '')
instead but that seems to break some other tests.
Any ideas on how to fix this would be appreciated.
Cheers