Skip to content

Commit

Permalink
Added 'comment' tag.
Browse files Browse the repository at this point in the history
Since the implementation is that simple, let's just do it.

Fixes: Issue #19
  • Loading branch information
vdboor committed Jul 21, 2011
1 parent 8e83446 commit bfbe298
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion h2o/tags.php
Expand Up @@ -387,6 +387,15 @@ function render($context, $stream) {
} }
} }


class Comment_Tag extends H2o_Node {
function __construct($argstring, $parser, $position) {
$parser->parse('endcomment');
}

function render($context, $stream, $index = 1) {
}
}

class Now_Tag extends H2o_Node { class Now_Tag extends H2o_Node {
function __construct($argstring, $parser, $pos=0) { function __construct($argstring, $parser, $pos=0) {
$this->format = $argstring; $this->format = $argstring;
Expand Down Expand Up @@ -436,5 +445,5 @@ function render($context, $stream) {
} }
} }


H2o::addTag(array('block', 'extends', 'include', 'if', 'ifchanged', 'for', 'with', 'cycle', 'load', 'debug', 'now', 'autoescape', 'csrf_token')); H2o::addTag(array('block', 'extends', 'include', 'if', 'ifchanged', 'for', 'with', 'cycle', 'load', 'debug', 'comment', 'now', 'autoescape', 'csrf_token'));
?> ?>

0 comments on commit bfbe298

Please sign in to comment.