diff --git a/diff2.js b/diff2.js index 59c17df..b89a4a1 100644 --- a/diff2.js +++ b/diff2.js @@ -740,6 +740,14 @@ function(A, B, cmp){ // compared... // - handle item shifts gracefully... // - diff recursively instead of flat... +// XXX another way to approach this is to treat indexes in a relative +// manner, i.e. keep track of relative order of elements... +// e.g. if we insert a sub-array then all the elements after it are +// simply shifted, that is, their relative order is maintained... +// ...this is already tracked by diffSections(..) but after +// handler(..) arrays are more like hashes, and we need to +// account for this.... +// var diff = function(A, B){ return diffSections(