From: Gabriel Wicke Date: Sat, 12 Jun 2004 01:24:10 +0000 (+0000) Subject: more cssification of diff rendering, some " -> ' in diff engine X-Git-Tag: 1.5.0alpha1~2900 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=0c16f4bc90b42fce42b29d3300373959df8a8193;p=lhc%2Fweb%2Fwiklou.git more cssification of diff rendering, some " -> ' in diff engine --- diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index ec25397d9a..2e3937ee48 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -1023,7 +1023,7 @@ class _HWLDF_WordAccumulator { function _flushGroup ($new_tag) { if ($this->_group !== '') { if ($this->_tag == 'mark') - $this->_line .= "$this->_group"; + $this->_line .= ''.$this->_group.''; else $this->_line .= $this->_group; } @@ -1124,8 +1124,8 @@ class TableDiffFormatter extends DiffFormatter $l1 = wfMsg( "lineno", $xbeg ); $l2 = wfMsg( "lineno", $ybeg ); - $r = "{$l1}\n" . - "{$l2}\n"; + $r = ''.$l1."\n" . + ''.$l2."\n"; return $r; } @@ -1141,27 +1141,27 @@ class TableDiffFormatter extends DiffFormatter } function addedLine( $line ) { - return "+" . - "{$line}"; + return '+' . + $line.''; } function deletedLine( $line ) { - return "-" . - "{$line}"; + return '-' . + $line.''; } function emptyLine() { - return " "; + return ' '; } function contextLine( $line ) { - return " {$line}"; + return ' '.$line.''; } function _added($lines) { global $wgOut; foreach ($lines as $line) { - $wgOut->addHTML( "" . $this->emptyLine() . + $wgOut->addHTML( '' . $this->emptyLine() . $this->addedLine( $line ) . "\n" ); } } @@ -1169,7 +1169,7 @@ class TableDiffFormatter extends DiffFormatter function _deleted($lines) { global $wgOut; foreach ($lines as $line) { - $wgOut->addHTML( "" . $this->deletedLine( $line ) . + $wgOut->addHTML( '' . $this->deletedLine( $line ) . $this->emptyLine() . "\n" ); } } @@ -1177,7 +1177,7 @@ class TableDiffFormatter extends DiffFormatter function _context( $lines ) { global $wgOut; foreach ($lines as $line) { - $wgOut->addHTML( "" . $this->contextLine( $line ) . + $wgOut->addHTML( '' . $this->contextLine( $line ) . $this->contextLine( $line ) . "\n" ); } } @@ -1190,7 +1190,7 @@ class TableDiffFormatter extends DiffFormatter while ( $line = array_shift( $del ) ) { $aline = array_shift( $add ); - $wgOut->addHTML( "" . $this->deletedLine( $line ) . + $wgOut->addHTML( '' . $this->deletedLine( $line ) . $this->addedLine( $aline ) . "\n" ); } $this->_added( $add ); # If any leftovers diff --git a/stylesheets/common.css b/stylesheets/common.css index 388e9fc923..b32503f42f 100644 --- a/stylesheets/common.css +++ b/stylesheets/common.css @@ -78,24 +78,22 @@ div.tleft { border:1px dashed #aaaaaa; } -table.diff { - background:white; +table.diff { background:white; } +td.diff-otitle { background:#cccccc; } +td.diff-ntitle { background:#cccccc; } +td.diff-addedline { + background:#ccffcc; + font-size: smaller; } -td.diff-otitle { - background:#cccccc; -} -td.diff-ntitle { - background:#cccccc; -} -td.diff-addedline { - background:#ccffcc; -} -td.diff-deletedline { - background:#ffffaa; +td.diff-deletedline { + background:#ffffaa; + font-size: smaller; } td.diff-context { - background:#eeeeee; + background:#eeeeee; + font-size: smaller; } +span.diffchange { color: red; } img { border: none; } img.tex { vertical-align: middle; } diff --git a/stylesheets/monobook/main.css b/stylesheets/monobook/main.css index 68ba9467a1..a4393f4f3a 100644 --- a/stylesheets/monobook/main.css +++ b/stylesheets/monobook/main.css @@ -451,9 +451,19 @@ div.townBox dl dd { table.diff { background:white; } td.diff-otitle { background:#ffffff; } td.diff-ntitle { background:#ffffff; } -td.diff-addedline { background:#ccffcc; } -td.diff-deletedline { background:#ffffaa; } -td.diff-context { background:#eeeeee; } +td.diff-addedline { + background:#ccffcc; + font-size: smaller; +} +td.diff-deletedline { + background:#ffffaa; + font-size: smaller; +} +td.diff-context { + background:#eeeeee; + font-size: smaller; +} +span.diffchange { color: red; } /* ** keep the whitespace in front of the ^=, hides rule from konqueror