diff --git a/core/Diff.php b/core/Diff.php index 8157b7946..c5b4a81ce 100644 --- a/core/Diff.php +++ b/core/Diff.php @@ -749,7 +749,7 @@ class Diff if($tagStack[$listName]) $rechunked[$listName][sizeof($rechunked[$listName])-1] .= ' ' . $item; else $rechunked[$listName][] = $item; - if($lookForTag && isset($item[0]) && $item[0] == "<" && substr($item,0,2) != "markTestSkipped('"DOMDocument" required'); + return; + } + + $from = " + + + + + + + + + + + + + +
Row 1
Row 2Row 2
Row 3Row 3
"; + + $to = " + + + + + + + + + +
Row 1
Row 2Row 2
"; + + $expected = "" . $to . "" . "" . $from . ""; + $compare = Diff::compareHTML($from, $to); + + // Very hard to debug this way, wouldn't need to do this if PHP had an *actual* DOM parsing lib, + // and not just the poor excuse that is DOMDocument + $compare = preg_replace('/[\s\t\n\r]*/', '', $compare); + $expected = preg_replace('/[\s\t\n\r]*/', '', $expected); + + $this->assertEquals($compare, $expected); + } +} \ No newline at end of file