Am using google-diff-match-patch for comparing 2 strings for Difference. It works fine for most part, except if the first Character in a word is the same.
For Ex:
Text1 = CHICAGO IL
Text2 = COLUMBUS OH
Output:
deltas: [Diff(EQUAL,"C"), Diff(DELETE,"HICAGO IL"), Diff(INSERT,"OLUMBUS OH")]
<span>C</span><span class='SS_ChangeDelete'>HICAGO IL</span><span class='SS_ChangeAdd'>OLUMBUS OH</span>
Desired Output:
deltas: [Diff(DELETE,"CHICAGO IL"), Diff(INSERT,"COLUMBUS OH")]
<span class='SS_ChangeDelete'>CHICAGO IL</span><span class='SS_ChangeAdd'>COLUMBUS OH</span>
Any Suggestions or if there is any other library out there can do the trick ? Thanks in Advance