mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
chore(diff) lint
This commit is contained in:
parent
3dbcb08c97
commit
c49d202183
1 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue