From 49eda2d892b70f862393f0eb48ec1585120d42e7 Mon Sep 17 00:00:00 2001 From: Cagatay Ulubay Date: Fri, 20 Nov 2015 16:58:05 +0100 Subject: [PATCH] [00000] Fixed a bug where a newline will apear at first line when using pretty option --- Compiler.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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;