From: Armin Ronacher Date: Mon, 1 Oct 2007 20:31:16 +0000 (+0200) Subject: added missing lineno, filename forward in jinja parser X-Git-Tag: 2.0rc1~265 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=eaf493e937ac88be10597603474b609966e30d87;p=jinja2.git added missing lineno, filename forward in jinja parser --HG-- branch : trunk --- diff --git a/jinja/filters.py b/jinja/filters.py index f9199a6..675f310 100644 --- a/jinja/filters.py +++ b/jinja/filters.py @@ -18,7 +18,7 @@ from jinja.datastructure import TemplateData from jinja.exceptions import FilterArgumentError, SecurityException -_striptags_re = re.compile(r'(|<[^>]+>)') +_striptags_re = re.compile(r'(|<[^>]*>)') def stringfilter(f): diff --git a/jinja/parser.py b/jinja/parser.py index c31c11b..dd7aa82 100644 --- a/jinja/parser.py +++ b/jinja/parser.py @@ -510,7 +510,6 @@ class Parser(object): op = self.stream.current.type self.stream.next() ops.append([op, self.parse_add_expression()]) - lineno = self.stream.lineno elif self.stream.current.type == 'not' and \ self.stream.look().type == 'in': self.stream.skip(2) @@ -519,7 +518,7 @@ class Parser(object): break if not ops: return expr - return nodes.CompareExpression(expr, ops) + return nodes.CompareExpression(expr, ops, lineno, self.filename) def parse_add_expression(self): """