salgmachine / daisydiff

Automatically exported from code.google.com/p/daisydiff
0 stars 0 forks source link

An element that was moved out of a table can lead to broken table elements in the diff #52

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using the old.html and new.html files attached, call "java -jar 
daisydiff.jar old.html new.html"
This produces the attached daisydiff.html

What is the expected output? What do you see instead?
The produced daisydiff.htm contains a <td> Element that is outside of any 
<table>.
In my case the "abc" String should not have been moved out of table.

What version of the product are you using? On what operating system?
daisydiff 1.2 running on osx

Original issue reported on code.google.com by christop...@gmail.com on 25 Apr 2013 at 8:17

Attachments:

GoogleCodeExporter commented 9 years ago
A workaround (until fixed) is to use jSoup (jsoup.org) to parse the resultant 
output from DaisyDiff into a jSoup Document object and then toString() that to 
generate a clean HTML string.  jSoup will clean up any erroneous elements in 
the document.

eg:
docObj = jSoup.parse(diff_HTML);
return docObj.toString();

Original comment by henrythe...@gmail.com on 16 Jul 2013 at 12:13