Adds a `do` tag to Jinja2 that works like the print statement just that it doesn't print the return value.
| 404 | |
| 405 | |
| 406 | class ExprStmtExtension(Extension): |
| 407 | """Adds a `do` tag to Jinja2 that works like the print statement just |
| 408 | that it doesn't print the return value. |
| 409 | """ |
| 410 | tags = set(['do']) |
| 411 | |
| 412 | def parse(self, parser): |
| 413 | node = nodes.ExprStmt(lineno=next(parser.stream).lineno) |
| 414 | node.node = parser.parse_tuple() |
| 415 | return node |
| 416 | |
| 417 | |
| 418 | class LoopControlExtension(Extension): |
nothing calls this directly
no test coverage detected
searching dependent graphs…