1
0
mirror of synced 2024-12-13 14:56:01 +03:00

Do not add trailing whitespace to blank lines

This commit is contained in:
Nick Masters 2012-10-30 22:22:04 +00:00
parent 98c5b34f2b
commit 0f92944edd

View File

@ -1207,7 +1207,9 @@ public function __construct()
$lines = explode("\n", $code);
foreach ($lines as $key => $value) {
$lines[$key] = str_repeat($this->spaces, $num) . $lines[$key];
if (!empty($value)) {
$lines[$key] = str_repeat($this->spaces, $num) . $lines[$key];
}
}
return implode("\n", $lines);