pellcorp / java-diff-utils

Automatically exported from code.google.com/p/java-diff-utils
0 stars 0 forks source link

Delta isn't working for the collection bellow #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I Have 2 Collections (original and revised) with 53 and 1 elements each.

The collection.toString() content is reproduced bellow.

original: [<p>Esta &eacute; uma obra Online.</p>, <p>&nbsp;</p>,
<p><strong>Este texto &eacute; negrito</strong></p>, <p><em>Este texto
&eacute; it&aacute;lico</em></p>, <p><span style="text-decoration:
underline;">Este texto est&aacute; sublinhado</span></p>, <p><span
style="text-decoration: line-through;">Este texto est&aacute;
riscado</span></p>, <p style="text-align: center;">Este texto est&aacute;
centralizado</p>, <p style="text-align: right;">Este texto est&aacute;
alinhado a direita</p>, <ol>, <li>Este texto est&aacute; em uma lista
num&eacute;rica<ol>, <li>Este texto est&aacute; identado</li>, </ol></li>,
</ol>, <p><a title="uol" href="http://www.uol.com.br" target="_blank">Este
aqui &eacute; um link</a></p>, <p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>,
<p>&nbsp;</p>, <p>P&aacute;gina 1</p>, <p>&nbsp;</p>, <p>&nbsp;</p>,
<p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>,
<p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>,
<p>P&aacute;gina 2</p>, <p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>,
<p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>,
<p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>,
<p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>, <p>&nbsp;</p>,
<p>&nbsp;</p>, <p>P&aacute;gina 3</p>, <p>&nbsp;</p>]

revised: [<p>Revis&atilde;o 3</p><p>&nbsp;</p><p>Esta &eacute; uma obra
Online.</p><p>&nbsp;</p><p><strong>Este texto &eacute;
negrit</strong></p><p>Este texto &eacute; it&aacute;lico/p><p><span
style="text-decoration: undeline;">Este texto est&aacute;
sublinhado</span></p><p>Este texto est&aacute; riscado agora n&atilde;o
est&aacute; mais</p>p style="text-align: left;">Este texto est&aacute;
centralizado nem este</p><p style="text-align: right;">Este texto
est&aacute; alinhado a direita</p><ol><li>Este texto est&aacute; em uma
lista num&eacute;rica</li></ol><p><a title="uol"
href="http://www.uol.com.br" target="_blank">Este aqui &eacute; um
link</a></p>]

DiffUtils shows only 1 Delta for line 1. It does not show other 52 changes.

I am using 1.1 version.

Congrats for the job

Original issue reported on code.google.com by rafabene on 7 Oct 2009 at 6:33

GoogleCodeExporter commented 9 years ago
Thanks for your report.

Can you provide me an expected output for your case? It looks fine for me to 
see 1 delta for your data, because I can't find any common string between 1 and 
2. So to transform first string to second, you should completely change the 
content of first text and replace it with second. This is what diff lib shows 
for you.

Thanks,
Dmitry

Original comment by dm.naume...@gmail.com on 22 Jul 2010 at 7:32