From 3cba36f95927df5dfdf024a8951c8d2556ca76a8 Mon Sep 17 00:00:00 2001 From: Rodrigo Fernandes Date: Fri, 6 May 2016 23:11:00 +0100 Subject: [PATCH] Fix tests in node 0.12 --- src/diff-parser.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/diff-parser.js b/src/diff-parser.js index 82cbfc6..4d9695d 100644 --- a/src/diff-parser.js +++ b/src/diff-parser.js @@ -198,7 +198,7 @@ * --- 2002-02-21 23:30:39.942229878 -0800 */ if (currentFile && !currentFile.oldName && - line.startsWith('---') && (values = getSrcFilename(line, config))) { + utils.startsWith(line, '---') && (values = getSrcFilename(line, config))) { currentFile.oldName = values; currentFile.language = getExtension(currentFile.oldName, currentFile.language); return; @@ -209,7 +209,7 @@ * +++ 2002-02-21 23:30:39.942229878 -0800 */ if (currentFile && !currentFile.newName && - line.startsWith('+++') && (values = getDstFilename(line, config))) { + utils.startsWith(line, '+++') && (values = getDstFilename(line, config))) { currentFile.newName = values; currentFile.language = getExtension(currentFile.newName, currentFile.language); return; @@ -226,7 +226,7 @@ * 2. Old line starts with: - * 3. Context line starts with: */ - if (currentBlock && (line.startsWith('+') || line.startsWith('-') || line.startsWith(' '))) { + if (currentBlock && (utils.startsWith(line, '+') || utils.startsWith(line, '-') || utils.startsWith(line, ' '))) { createLine(line); return; }