We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7f143c commit 13b33efCopy full SHA for 13b33ef
diff.js
@@ -270,13 +270,8 @@
270
lastLineLastChar = lastLine ? lastLine[lastLine.length - 1] : '';
271
272
// Merge lines that may contain windows new lines
273
- if (line === '\n' && (lastLineLastChar === '\r' || lastLineLastChar === '\n')) {
274
- if (this.ignoreTrim || lastLineLastChar === '\n'){
275
- //to avoid merging to \n\n, remove \n and add \r\n.
+ if (line === '\n' && lastLineLastChar === '\r') {
276
retLines[retLines.length - 1] = retLines[retLines.length - 1].slice(0,-1) + '\r\n';
277
- } else {
278
- retLines[retLines.length - 1] += '\n';
279
- }
280
} else if (line) {
281
if (this.ignoreTrim) {
282
line = line.trim();
0 commit comments