diff --git a/diff2.js b/diff2.js index 4865d7a..59c17df 100644 --- a/diff2.js +++ b/diff2.js @@ -703,6 +703,9 @@ function(A, B, cmp){ // ] // // NOTE: this is generic -- does not care what it compares... +// +// XXX would be nice to be able to mixin stuff cmp -- to wrap container +// type and the like... var diffSections = module.diffSections = function(A, B, cmp){ @@ -731,8 +734,12 @@ function(A, B, cmp){ // insert an item into an array, this effectively changes all other // items (shifting their indexes by the number of items inserted)... // ...need to treat this gracefully... -// ......ignore array index??? -// ...to do this we need to know object type per element compared... +// we can: +// - ignore array index??? +// ...to do this we need to know object type per element +// compared... +// - handle item shifts gracefully... +// - diff recursively instead of flat... var diff = function(A, B){ return diffSections(