Closed vy closed 9 years ago
Even then you can end up getting files that came from another OS, so I wouldn't recommend that. I just put in a pull request that uses the regexp /\r\n?|\n/
as the default separator (and adds the ability to use a regexp separator to begin with), so it automatically handles files from any platform correctly.
I'll have to agree with @jedwards1211 on this one. Thanks to his recent PR, the new default is now /\r\n?|\n/
.
IMHO, hardcoded
\n
should be replaced withos.EOL
. Further, it would be really handy if line-separator could automatically make a decision between\n
and\r\n
by looking at the very first line.