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