Open GoogleCodeExporter opened 8 years ago
if you use "abcde" and "ab*de" it will show a single change from 'c' to '*' but
this shows what the algorighm is doing "wrong". If it is thinking in terms of
inserts and deletes only for "aaaaa" -> "aa*aa", there is no difference between
the steps a, a, delete-a, insert-*, a, a and the steps a, a, insert-*, a, a,
delete-a and it only happens when there are repeated characters (in this case
'a' characters) after the change point. I'm guessing the delete-insert when
together turn into a change but the delete and insert separated by two 'a'
characters wouldn't. So ... if you decide it is a bug, the problem is in the
way the diff algorithm weighs the cost of inserts and deletes when optimizing.
Deletes and inserts that are next to each other can turn into a change and
should weigh, together, the same as a single delete or insert.
Original comment by LeeMeado...@gmail.com
on 4 May 2011 at 11:19
Original issue reported on code.google.com by
LeeMeado...@gmail.com
on 2 May 2011 at 2:31Attachments: