Skip to content

Commit b9ef24f

Browse files
bp-devkpdecker
authored andcommitted
Support patches with empty lines
Code styling
1 parent 10aaabb commit b9ef24f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/patch/parse.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function parsePatch(uniDiff, options = {}) {
9595
&& diffstr[i + 2].indexOf('@@') === 0) {
9696
break;
9797
}
98-
let operation = (diffstr[i].length==0 && i!=diffstr.length-1) ? ' ' : diffstr[i][0];
98+
let operation = (diffstr[i].length == 0 && i != (diffstr.length - 1)) ? ' ' : diffstr[i][0];
9999

100100
if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') {
101101
hunk.lines.push(diffstr[i]);

0 commit comments

Comments
 (0)