diff --git a/Compiler.php b/Compiler.php index 72f0878..3d76925 100644 --- a/Compiler.php +++ b/Compiler.php @@ -1696,7 +1696,11 @@ protected function compileChildren(array $nodes, $indent = true, $allowInline = $phtml .= ' '; } - $phtml .= $this->newLine().$this->indent().$this->compileNode($node); + if ($node->type != 'doctype') { + $phtml .= $this->newLine(); + } + + $phtml .= $this->indent().$this->compileNode($node); } $this->_level -= $indent ? 1 : 0;