From c495dc45dedcf43c372ac75d0f966501950bfb6e Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 31 Jan 2011 13:59:22 +0100 Subject: Added colspan option for the InlineDiffFormatter --- inc/DifferenceEngine.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 1e1d4c3a3..36322d222 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -1087,6 +1087,7 @@ class TableDiffFormatter extends DiffFormatter { * */ class InlineDiffFormatter extends DiffFormatter { + var $colspan = 4; function InlineDiffFormatter() { $this->leading_context_lines = 2; @@ -1113,7 +1114,7 @@ class InlineDiffFormatter extends DiffFormatter { $xbeg .= "," . $xlen; if ($ylen != 1) $ybeg .= "," . $ylen; - $r = '@@ '.$lang['line']." -$xbeg +$ybeg @@"; + $r = '@@ '.$lang['line']." -$xbeg +$ybeg @@"; $r .= ' '.$lang['deleted'].''; $r .= ' '.$lang['created'].''; $r .= "\n"; @@ -1132,19 +1133,19 @@ class InlineDiffFormatter extends DiffFormatter { function _added($lines) { foreach ($lines as $line) { - print(''. $line . "\n"); + print(''. $line . "\n"); } } function _deleted($lines) { foreach ($lines as $line) { - print('' . $line . "\n"); + print('' . $line . "\n"); } } function _context($lines) { foreach ($lines as $line) { - print(''.$line."\n"); + print(''.$line."\n"); } } @@ -1153,7 +1154,7 @@ class InlineDiffFormatter extends DiffFormatter { $add = $diff->inline(); foreach ($add as $line) - print(''.$line."\n"); + print(''.$line."\n"); } } -- cgit v1.2.3