avancement planning
This commit is contained in:
+8
-8
@@ -548,10 +548,10 @@ function parsePatch(uniDiff) {
|
||||
} // Diff index
|
||||
|
||||
|
||||
var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line);
|
||||
var headerMatch = /^(?:Index:|diff(?: -r \w+)+)\s+/.exec(line);
|
||||
|
||||
if (header) {
|
||||
index.index = header[1];
|
||||
if (headerMatch) {
|
||||
index.index = line.substring(headerMatch[0].length).trim();
|
||||
}
|
||||
|
||||
i++;
|
||||
@@ -583,14 +583,14 @@ function parsePatch(uniDiff) {
|
||||
|
||||
|
||||
function parseFileHeader(index) {
|
||||
var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]);
|
||||
var fileHeaderMatch = /^(---|\+\+\+)\s+/.exec(diffstr[i]);
|
||||
|
||||
if (fileHeader) {
|
||||
var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';
|
||||
var data = fileHeader[2].split('\t', 2);
|
||||
if (fileHeaderMatch) {
|
||||
var keyPrefix = fileHeaderMatch[1] === '---' ? 'old' : 'new';
|
||||
var data = diffstr[i].substring(3).trim().split('\t', 2);
|
||||
var fileName = data[0].replace(/\\\\/g, '\\');
|
||||
|
||||
if (/^".*"$/.test(fileName)) {
|
||||
if (fileName.startsWith('"') && fileName.endsWith('"')) {
|
||||
fileName = fileName.substr(1, fileName.length - 2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user