Go to the documentation of this file.
36 $this->leadingContextLines = 2;
37 $this->trailingContextLines = 2;
46 $msg = preg_replace(
'/^ /m',
"\u{00A0} ", $msg );
47 $msg = preg_replace(
'/ $/m',
" \u{00A0}", $msg );
48 $msg = preg_replace(
'/ /',
"\u{00A0} ", $msg );
61 protected function blockHeader( $xbeg, $xlen, $ybeg, $ylen ) {
69 [
'colspan' =>
'2',
'class' =>
'diff-lineno',
'id' =>
'mw-diff-left-l' . $xbeg ],
70 '<!--LINE ' . $xbeg .
'-->'
75 [
'colspan' =>
'2',
'class' =>
'diff-lineno' ],
76 '<!--LINE ' . $ybeg .
'-->'
95 protected function lines(
$lines, $prefix =
' ', $color =
'white' ) {
139 if (
$line !==
'' ) {
146 $markerAttrs = [
'class' =>
'diff-marker' ];
148 $markerAttrs[
'data-marker'] = $marker;
177 [
'class' =>
'diffchange' ],
201 [
'class' =>
'diffchange' ],
237 protected function changed( $orig, $closing ) {
239 $del = $diff->orig();
240 $add = $diff->closing();
242 # Notice that WordLevelDiff returns HTML-escaped output.
243 # Hence, we will be calling addedLine/deletedLine without HTML-escaping.
245 $ndel = count( $del );
246 $nadd = count( $add );
247 $n = max( $ndel, $nadd );
248 for ( $i = 0; $i < $n; $i++ ) {
Performs a word-level diff on several lines.
if(!file_exists( $CREDITS)) $lines
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
static element( $element, $attribs=[], $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).