nyxtom/reconcile.js

Diff not working properly

Opened this issue · 0 comments

var base = document.createElement('div');
       base.innerHTML = 'Hello Mr. Wayne, decide what to do:';
       var source = document.createElement('div');
       source.innerHTML = 'Hello Batman, decide what to do:';
       var result = diff(source, base);
     	  var conflicts = apply(result, base,true,true);
     console.log(base);

Actual o/p :- <div>Hello <del>Mr. Wayne, </del>de what to do:<ins>Batman, </ins>de what to do:to do:</div>

expected o/p :- Hello <del>Mr. Wayne</del><ins>Batman, </ins>, decide what to do