Comments get ignored by the parser and raw blocks just get output
directly as a string into the AST.
if 'start' in ast and 'end' in ast:\r
return parse_block_pair(ast)\r
\r
+ if 'raw' in ast:\r
+ return parse_raw(ast)\r
+\r
+ if 'comment' in ast:\r
+ return parse_comment(ast)\r
+\r
return None\r
\r
def parse_block(ast):\r
\r
return with_node\r
\r
+def parse_comment(ast):\r
+ return None\r
+\r
def parse_literal(ast):\r
if 'literal_type' not in ast:\r
raise\r
\r
return nodes.Output([node])\r
\r
+def parse_raw(ast):\r
+ return parse_output(\r
+ ''.join(ast['raw'])\r
+ )\r
+\r
def parse_template(ast):\r
return nodes.Template(parse(ast), lineno=1)\r
\r