X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdiff%2FTableDiffFormatter.php;h=845c2bc284dfe0e498d63d2ea9e84332be7e5f93;hb=48c8531c2edc45a7ed0791f94149f7b3c5eab8d3;hp=14307b58440008a5a5335db81984f9057ad34d09;hpb=598a250b71aee0ca14eb8661b139bb23cf8e5f40;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/diff/TableDiffFormatter.php b/includes/diff/TableDiffFormatter.php index 14307b5844..845c2bc284 100644 --- a/includes/diff/TableDiffFormatter.php +++ b/includes/diff/TableDiffFormatter.php @@ -38,15 +38,14 @@ class TableDiffFormatter extends DiffFormatter { } /** - * @static * @param string $msg * * @return mixed */ public static function escapeWhiteSpace( $msg ) { - $msg = preg_replace( '/^ /m', '  ', $msg ); - $msg = preg_replace( '/ $/m', '  ', $msg ); - $msg = preg_replace( '/ /', '  ', $msg ); + $msg = preg_replace( '/^ /m', "\u{00A0} ", $msg ); + $msg = preg_replace( '/ $/m', " \u{00A0}", $msg ); + $msg = preg_replace( '/ /', "\u{00A0} ", $msg ); return $msg; } @@ -124,7 +123,7 @@ class TableDiffFormatter extends DiffFormatter { * @return string */ protected function contextLine( $line ) { - return $this->wrapLine( ' ', 'diff-context', $line ); + return $this->wrapLine( "\u{00A0}", 'diff-context', $line ); } /** @@ -147,7 +146,7 @@ class TableDiffFormatter extends DiffFormatter { * @return string */ protected function emptyLine() { - return ' '; + return "\u{00A0}"; } /**