Fixed bug in HTML differ. A bad index was used when everything is removed from a...
authorGuy Van den Broeck <guyvdb@users.mediawiki.org>
Mon, 27 Oct 2008 10:15:24 +0000 (10:15 +0000)
committerGuy Van den Broeck <guyvdb@users.mediawiki.org>
Mon, 27 Oct 2008 10:15:24 +0000 (10:15 +0000)
includes/diff/HTMLDiff.php

index cb169aa..0698059 100644 (file)
@@ -323,7 +323,7 @@ class TextNodeDiffer {
                        } else {
                                $prevResult = new LastCommonParentResult();
                                $prevResult->parent = $this->bodyNode;
-                               $prevResult->indexInLastCommonParent = 0;
+                               $prevResult->indexInLastCommonParent = -1;
                        }
                        if (isset($nextleaf)) {
                                $nextResult = $nextLeaf->getLastCommonParent($deletedNodes[count($deletedNodes) - 1]);