We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 260c8f2 commit ed56981Copy full SHA for ed56981
src/Phug/Compiler/CommentCompiler.php
@@ -4,7 +4,7 @@
4
5
use Phug\AbstractNodeCompiler;
6
use Phug\CompilerException;
7
-use Phug\Formatter\Element\TextElement;
+use Phug\Formatter\Element\CommentElement;
8
use Phug\Formatter\ElementInterface;
9
use Phug\Parser\Node\CommentNode;
10
use Phug\Parser\NodeInterface;
@@ -19,12 +19,13 @@ public function compileNode(NodeInterface $node, ElementInterface $parent = null
19
);
20
}
21
22
+ /** @var CommentNode $node */
23
if (!$node->isVisible()) {
24
return null;
25
26
27
$comment = $this->getTextChildren($node);
28
- return new TextElement('<!-- '.$comment.' -->');
29
+ return new CommentElement($comment);
30
31
0 commit comments