Skip to content

Commit 4c7bd74

Browse files
committed
Merge pull request #7 from maximal/patch-1
Add ability not to expand tabs
2 parents 4af7b5c + d1fc6ff commit 4c7bd74

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/Diff/Renderer/Html/Array.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ private function getChangeExtent($fromLine, $toLine)
174174
*/
175175
private function formatLines($lines)
176176
{
177-
$lines = array_map(array($this, 'ExpandTabs'), $lines);
177+
if ($this->options['tabSize'] !== false) {
178+
$lines = array_map(array($this, 'ExpandTabs'), $lines);
179+
}
178180
$lines = array_map(array($this, 'HtmlSafe'), $lines);
179181
foreach($lines as &$line) {
180182
$line = preg_replace_callback('# ( +)|^ #', __CLASS__."::fixSpaces", $line);
@@ -222,4 +224,4 @@ private function htmlSafe($string)
222224
{
223225
return htmlspecialchars($string, ENT_NOQUOTES, 'UTF-8');
224226
}
225-
}
227+
}

0 commit comments

Comments
 (0)