nozavroni / csvelte

🕺🏻 CSV and Tabular Data library for PHP
http://phpcsv.com/
Other
6 stars 0 forks source link

reader bug - if there is no newline at EOF, last line is ignored #191

Closed nozavroni closed 5 years ago

nozavroni commented 5 years ago

When reading CSV data, the last line is ignored if the user forgets to place a newline character at the end.

nozavroni commented 5 years ago

I'm really not thrilled about the changes I had to make to get this fixed. In order to make this work I had to take what I felt like was a very clean, very easy-to-understand iterator and complicated it quite a bit. I would like to address this in the future to try to simplify and improve the changes I made. But I've spent enough time on this for now, so I'm committing and moving on.