Commit c5d382c6 by Carsten Brandt

added newline to end of header and body blocks in View

issue #237
parent 48f38844
......@@ -771,7 +771,7 @@ class View extends Component
if (!empty($this->js[self::POS_HEAD])) {
$lines[] = implode("\n", $this->js[self::POS_HEAD]);
}
return implode("\n", $lines);
return empty($lines) ? '' : implode("\n", $lines) . "\n";
}
/**
......@@ -788,7 +788,7 @@ class View extends Component
if (!empty($this->js[self::POS_BEGIN])) {
$lines[] = implode("\n", $this->js[self::POS_BEGIN]);
}
return implode("\n", $lines);
return empty($lines) ? '' : implode("\n", $lines) . "\n";
}
/**
......@@ -805,6 +805,6 @@ class View extends Component
if (!empty($this->js[self::POS_END])) {
$lines[] = implode("\n", $this->js[self::POS_END]);
}
return implode("\n", $lines);
return empty($lines) ? '' : implode("\n", $lines) . "\n";
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment