mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
refactor(diff) applyPatch
This commit is contained in:
parent
c8254b07cf
commit
30be394ace
1 changed files with 3 additions and 2 deletions
|
|
@ -12,9 +12,10 @@
|
|||
|
||||
this.applyPatch = function(oldText, patch) {
|
||||
var patches = dmp.patch_fromText(patch),
|
||||
results = dmp.patch_apply(patches, oldText)[0];
|
||||
result = dmp.patch_apply(patches, oldText);
|
||||
newText = result[0];
|
||||
|
||||
return results;
|
||||
return newText;
|
||||
};
|
||||
};
|
||||
})(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue