Modify no newline parser regex to be an else if

This commit is contained in:
= 2025-03-19 16:51:59 -07:00
parent e8aadb0785
commit 042fd60faf

View file

@ -470,8 +470,7 @@ export function parse(diffInput: string, config: DiffParserConfig = {}): DiffFil
} else if ((values = combinedDeletedFile.exec(line))) { } else if ((values = combinedDeletedFile.exec(line))) {
currentFile.deletedFileMode = values[1]; currentFile.deletedFileMode = values[1];
currentFile.isDeleted = true; currentFile.isDeleted = true;
} } else if (line.match(noNewlineAtEndOfFile)) {
if (line.match(noNewlineAtEndOfFile)) {
createLine(line); createLine(line);
} }
}); });