Skip to content

Commit 042a837

Browse files
Backport #647
1 parent 370a9df commit 042a837

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/patch/parse.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ export function parsePatch(uniDiff, options = {}) {
1818
}
1919

2020
// Diff index
21-
let header = (/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/).exec(line);
22-
if (header) {
23-
index.index = header[1];
21+
let headerMatch = (/^(?:Index:|diff(?: -r \w+)+)\s+/).exec(line);
22+
if (headerMatch) {
23+
index.index = line.substring(headerMatch[0].length).trim();
2424
}
2525

2626
i++;

0 commit comments

Comments
 (0)