private function generateTagContent() { $content = $this->getSpaces() . "<?php " . $this->_code . " ?>\n"; $content .= $this->renderChildren(); $compiler = $this->getCompiler(); // checking if there is an appended tag $currLine = $this->getLineNumber() + $this->getChildrenCount() + 1; do { $line = $compiler->getLine($currLine); $currLine++; } while ($line !== null && (trim($line) == '' || $this->getIndentOfLine($line) > $this->getIndentationLevel())); $nextLineTag = null; if ($line !== null && $this->isTag($line)) { $nextLineTag = new TagNode($line); } if (!($nextLineTag !== null && strtolower($nextLineTag->getTagName()) !== 'if' && strlen($nextLineTag->getSpaces()) == strlen($this->getSpaces()) && !$nextLineTag->isLoud())) { $content .= $this->getSpaces() . "<?php " . $this->_tags[$this->_tag] . "; ?>"; } else { $content = rtrim($content); } return $content; }