function _flushGroup ($new_tag) {
if ($this->_group !== '') {
if ($this->_tag == 'mark')
- $this->_line .= "<font color=\"red\">$this->_group</font>";
+ $this->_line .= '<span class="diffchange">'.$this->_group.'</span>';
else
$this->_line .= $this->_group;
}
$l1 = wfMsg( "lineno", $xbeg );
$l2 = wfMsg( "lineno", $ybeg );
- $r = "<tr><td colspan='2' align='left'><strong>{$l1}</strong></td>\n" .
- "<td colspan='2' align='left'><strong>{$l2}</strong></td></tr>\n";
+ $r = '<tr><td colspan="2" align="left"><strong>'.$l1."</strong></td>\n" .
+ '<td colspan="2" align="left"><strong>'.$l2."</strong></td></tr>\n";
return $r;
}
}
function addedLine( $line ) {
- return "<td>+</td><td class='diff-addedline'>" .
- "<small>{$line}</small></td>";
+ return '<td>+</td><td class="diff-addedline">' .
+ $line.'</td>';
}
function deletedLine( $line ) {
- return "<td>-</td><td class='diff-deletedline'>" .
- "<small>{$line}</small></td>";
+ return '<td>-</td><td class="diff-deletedline">' .
+ $line.'</td>';
}
function emptyLine() {
- return "<td colspan='2'> </td>";
+ return '<td colspan="2"> </td>';
}
function contextLine( $line ) {
- return "<td> </td><td class='diff-context'><small>{$line}</small></td>";
+ return '<td> </td><td class="diff-context">'.$line.'</td>';
}
function _added($lines) {
global $wgOut;
foreach ($lines as $line) {
- $wgOut->addHTML( "<tr>" . $this->emptyLine() .
+ $wgOut->addHTML( '<tr>' . $this->emptyLine() .
$this->addedLine( $line ) . "</tr>\n" );
}
}
function _deleted($lines) {
global $wgOut;
foreach ($lines as $line) {
- $wgOut->addHTML( "<tr>" . $this->deletedLine( $line ) .
+ $wgOut->addHTML( '<tr>' . $this->deletedLine( $line ) .
$this->emptyLine() . "</tr>\n" );
}
}
function _context( $lines ) {
global $wgOut;
foreach ($lines as $line) {
- $wgOut->addHTML( "<tr>" . $this->contextLine( $line ) .
+ $wgOut->addHTML( '<tr>' . $this->contextLine( $line ) .
$this->contextLine( $line ) . "</tr>\n" );
}
}
while ( $line = array_shift( $del ) ) {
$aline = array_shift( $add );
- $wgOut->addHTML( "<tr>" . $this->deletedLine( $line ) .
+ $wgOut->addHTML( '<tr>' . $this->deletedLine( $line ) .
$this->addedLine( $aline ) . "</tr>\n" );
}
$this->_added( $add ); # If any leftovers