* QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
* QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) === "the quick <del>brown </del> fox jump<ins>s</ins><del>ed</del over"
*/
*/
QUnit.diff=(function(){
QUnit.diff=(function(){
varhasOwn=Object.prototype.hasOwnProperty;
/*jshint eqeqeq:false, eqnull:true */
functionDiffMatchPatch(){
functiondiff(o,n){
vari,
// Defaults.
ns={},
// Redefine these in your program to override the defaults.
os={};
// Number of seconds to map a diff before giving up (0 for infinity).
for(i=0;i<n.length;i++){
this.DiffTimeout=1.0;
if(!hasOwn.call(ns,n[i])){
// Cost of an empty edit operation in terms of edit characters.
ns[n[i]]={
this.DiffEditCost=4;
rows:[],
}
o:null
// DIFF FUNCTIONS
/**
* The data structure representing a diff is an array of tuples: