Am Dienstag, 26. März 2013 13:12:19 UTC+1 schrieb Christoph Dietze:
Hello there,
I stumbled upon the following problem:
When a tag is matched as changed that is originally inside a table while the new one is not (i.e. it was "moved out of a table") then this terminates the table context. Any following elements that originally were still in the table context are outside of any table in the diff.
In the example below, "<td><p>...def...</p></td>" is outside of any table in the diff which is invalid HTML.
I am using daisy-diff 1.2
old.html:
<table>
<tr>
<td><p>abc</p></td>
<td><p>def</p></td>
</tr>
</table>
new.html:
<p>abc</p>
daisydiff.html:
...
<p>
<span class="diff-html-changed" id="changed-diff-0"
changes="<ul class='changelist'><li>Moved out of a <b>table</b>.</li><li>Moved out of a <b>row</b>.</li><li>Moved out of a <b>cell</b>.</li></ul>"
previous="first-diff" changeId="changed-diff-0" next="removed-diff-0"
onclick="return tipC(constructToolTipC(this));">abc</span>
</p>
<td>
<p>
<span class="diff-html-removed" id="removed-diff-0" previous="changed-diff-0" changeId="removed-diff-0"
next="last-diff" onclick="return tipR(constructToolTipR(this));">def</span>
</p>
</td>
</body>
I guess the expected behavior is to not get any "change", but to have the whole original table removed.
Cheers,
Christoph