When internallinks are long - they simply can break table.diff layout because browsers (at least FF) can't break line if there are no spaces. We could use CSS3 word-wrap property but not all browsers support them. Second solution is to insert <wbr/> tag just after every ':' char (and maybe '/' too).
Sadly, <wbr/> is not part of the HTML standard, and quirksmode shows incomplete browser support for it. However, IE and FF both support <wbr/>.
http://www.quirksmode.org/oddsandends/wbr.html
diff -r 5c073276b791 inc/DifferenceEngine.php
--- a/inc/DifferenceEngine.php Mon Nov 23 17:38:08 2009 +0000
+++ b/inc/DifferenceEngine.php Mon Nov 23 17:40:23 2009 +0000
@@ -1003,23 +1003,27 @@ class TableDiffFormatter extends DiffFor
function addedLine( $line ) {
$line = str_replace(' ',' ',$line);
+ $line = str_replace(':',':<wbr/>',$line);
return '<td>+</td><td class="diff-addedline">' .
$line.'</td>';
}
function deletedLine( $line ) {
$line = str_replace(' ',' ',$line);
+ $line = str_replace(':',':<wbr/>',$line);
return '<td>-</td><td class="diff-deletedline">' .
$line.'</td>';
}
function emptyLine() {
//$line = str_replace(' ',' ',$line);
+ //$line = str_replace(':',':<wbr/>',$line);
return '<td colspan="2"> </td>';
}
function contextLine( $line ) {
$line = str_replace(' ',' ',$line);
+ $line = str_replace(':',':<wbr/>',$line);
return '<td> </td><td class="diff-context">'.$line.'</td>';
}