From c49d2021835c25fc643be2edad1ab923fc66f6e2 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 19 Nov 2013 07:51:24 +0000 Subject: [PATCH] chore(diff) lint --- lib/diff.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/diff.js b/lib/diff.js index 21ed339c..4f81a262 100644 --- a/lib/diff.js +++ b/lib/diff.js @@ -1,6 +1,8 @@ (function (obj) { - obj.DiffProto = function(diffMatchPatch) { - var dmp = new diffMatchPatch(); + 'use strict'; + + obj.DiffProto = function(DiffMatchPatch) { + var dmp = new DiffMatchPatch(); this.createPatch = function(oldText, newText) { var diff = dmp.diff_main(oldText, newText), @@ -12,7 +14,7 @@ this.applyPatch = function(oldText, patch) { var patches = dmp.patch_fromText(patch), - result = dmp.patch_apply(patches, oldText); + result = dmp.patch_apply(patches, oldText), newText = result[0]; return newText;