From f96b2344605c46ea4a2095dae21b9e6ed314089b Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 20 Jun 2021 19:59:59 +0300 Subject: [PATCH] notes... Signed-off-by: Alex A. Naanou --- diff2.js | 8 ++++++++ 1 file changed, 8 insertions(+) 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(