We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 370a9df commit 042a837Copy full SHA for 042a837
src/patch/parse.js
@@ -18,9 +18,9 @@ export function parsePatch(uniDiff, options = {}) {
18
}
19
20
// Diff index
21
- let header = (/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/).exec(line);
22
- if (header) {
23
- index.index = header[1];
+ let headerMatch = (/^(?:Index:|diff(?: -r \w+)+)\s+/).exec(line);
+ if (headerMatch) {
+ index.index = line.substring(headerMatch[0].length).trim();
24
25
26
i++;
0 commit comments