| OLD | NEW |
| 1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
| 2 """ | 2 """ |
| 3 jinja2.visitor | 3 jinja2.visitor |
| 4 ~~~~~~~~~~~~~~ | 4 ~~~~~~~~~~~~~~ |
| 5 | 5 |
| 6 This module implements a visitor for the nodes. | 6 This module implements a visitor for the nodes. |
| 7 | 7 |
| 8 :copyright: (c) 2010 by the Jinja Team. | 8 :copyright: (c) 2010 by the Jinja Team. |
| 9 :license: BSD. | 9 :license: BSD. |
| 10 """ | 10 """ |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 return node | 78 return node |
| 79 | 79 |
| 80 def visit_list(self, node, *args, **kwargs): | 80 def visit_list(self, node, *args, **kwargs): |
| 81 """As transformers may return lists in some places this method | 81 """As transformers may return lists in some places this method |
| 82 can be used to enforce a list as return value. | 82 can be used to enforce a list as return value. |
| 83 """ | 83 """ |
| 84 rv = self.visit(node, *args, **kwargs) | 84 rv = self.visit(node, *args, **kwargs) |
| 85 if not isinstance(rv, list): | 85 if not isinstance(rv, list): |
| 86 rv = [rv] | 86 rv = [rv] |
| 87 return rv | 87 return rv |
| OLD | NEW |