mirror of
https://github.com/flynx/diff.js.git
synced 2025-10-28 18:40:09 +00:00
notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e580ca99e7
commit
79ee039ed3
11
diff2.js
11
diff2.js
@ -703,6 +703,9 @@ function(A, B, cmp){
|
|||||||
// ]
|
// ]
|
||||||
//
|
//
|
||||||
// NOTE: this is generic -- does not care what it compares...
|
// 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 =
|
var diffSections =
|
||||||
module.diffSections =
|
module.diffSections =
|
||||||
function(A, B, cmp){
|
function(A, B, cmp){
|
||||||
@ -731,8 +734,12 @@ function(A, B, cmp){
|
|||||||
// insert an item into an array, this effectively changes all other
|
// insert an item into an array, this effectively changes all other
|
||||||
// items (shifting their indexes by the number of items inserted)...
|
// items (shifting their indexes by the number of items inserted)...
|
||||||
// ...need to treat this gracefully...
|
// ...need to treat this gracefully...
|
||||||
// ......ignore array index???
|
// we can:
|
||||||
// ...to do this we need to know object type per element compared...
|
// - 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 =
|
var diff =
|
||||||
function(A, B){
|
function(A, B){
|
||||||
return diffSections(
|
return diffSections(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user