edit in a batch group. Isolated and patched by Travis Derouin.
* Fix for paths in 1.4->1.5 special-case updater script
* (bug 8789) AJAX search: IE users can now use the return key
+* (bug 6844) Use <ins> and <del> tags to emphase the differences
== Languages updated ==
function _flushGroup ($new_tag) {
if ($this->_group !== '') {
- if ($this->_tag == 'mark')
- $this->_line .= '<span class="diffchange">' .
- htmlspecialchars ( $this->_group ) . '</span>';
+ if ($this->_tag == 'ins')
+ $this->_line .= '<ins class="diffchange">' .
+ htmlspecialchars ( $this->_group ) . '</ins>';
+ elseif ($this->_tag == 'del')
+ $this->_line .= '<del class="diffchange">' .
+ htmlspecialchars ( $this->_group ) . '</del>';
else
$this->_line .= htmlspecialchars ( $this->_group );
}
if ($edit->type == 'copy')
$orig->addWords($edit->orig);
elseif ($edit->orig)
- $orig->addWords($edit->orig, 'mark');
+ $orig->addWords($edit->orig, 'del');
}
$lines = $orig->getLines();
wfProfileOut( $fname );
if ($edit->type == 'copy')
$closing->addWords($edit->closing);
elseif ($edit->closing)
- $closing->addWords($edit->closing, 'mark');
+ $closing->addWords($edit->closing, 'ins');
}
$lines = $closing->getLines();
wfProfileOut( $fname );
$formatter = new TableDiffFormatter();
$funky = $formatter->format( $diffs );
$matches = array();
- preg_match_all( '/<span class="diffchange">(.*?)<\/span>/', $funky, $matches );
+ preg_match_all( '/<(?:ins|del) class="diffchange">(.*?)<\/span>/', $funky, $matches );
foreach( $matches[1] as $bit ) {
$hex = bin2hex( $bit );
echo "\t$hex\n";
background:#eeeeee;
font-size: smaller;
}
-span.diffchange { color: red; }
+ins.diffchange { color: red; text-decoration: none; }
+del.diffchange { color: red; text-decoration: none; }
a.external { color: #3366bb; }
background-color: #f8ffaa;
}
-span.diffchange { background-color: #FFCDF3; }
+ins.diffchange { background-color: #FFCDF3; text-decoration: none; }
+del.diffchange { background-color: #FFCDF3; text-decoration: none; }
.autocomment { color: grey; }
#pagehistory span.user {
margin-left: 1.4em;