Permalink
Browse files

Added 'comment' tag.

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 bfbe2983da921da8ec3956e5b1579dd1078a88d7
Showing with 10 additions and 1 deletion.
  1. +10 −1 h2o/tags.php
View
@@ -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 {
function __construct($argstring, $parser, $pos=0) {
$this->format = $argstring;
@@ -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.