diff --git a/src/diff-parser.js b/src/diff-parser.js index 4f3fdf6..57892cb 100644 --- a/src/diff-parser.js +++ b/src/diff-parser.js @@ -435,7 +435,7 @@ // Cleanup timestamps generated by the unified diff (diff command) as specified in // https://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html // Ie: 2016-10-25 11:37:14.000000000 +0200 - filename = filename.replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? \+\d{4}.*$/, ''); + filename = filename.replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [-+]\d{4}.*$/, ''); } return filename; diff --git a/test/diff-parser-tests.js b/test/diff-parser-tests.js index 756c3f8..2574c19 100644 --- a/test/diff-parser-tests.js +++ b/test/diff-parser-tests.js @@ -432,8 +432,6 @@ describe('DiffParser', function() { }); assert.deepEqual(linesContent, ['-test', '+test1r', '+test2r']); }); - - }); it('should parse unified non git diff', function() {