We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6dfcbb commit 4e6043fCopy full SHA for 4e6043f
lib/transforms/lines._js
@@ -12,12 +12,12 @@ module.exports = {
12
options = options || {};
13
14
function clean(line) {
15
- return line[line.length - 1] === '\r' ? line.substring(0, line.length - 1) : line;
+ return (!options.sep && line[line.length - 1] === '\r') ? line.substring(0, line.length - 1) : line;
16
}
17
return function(_, reader, writer) {
18
var remain = "";
19
reader.forEach(_, function(_, chunk) {
20
- var lines = chunk.split('\n');
+ var lines = chunk.split(options.sep || '\n');
21
if (lines.length > 1) {
22
writer.write(_, clean(remain + lines[0]));
23
for (var i = 1; i < lines.length - 1; i++) writer.write(_, clean(lines[i]));
0 commit comments