Skip to content
Myr

added missing lineno, filename forward in jinja parser

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 9b0545a · Browse files · 2 files+2 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−3 removed

  • other:+2 added−3 removed

2 files+2 added−3 removed

modified:jinja/filters.py+1 added-1 removed
16 unmodified lines
17from jinja.datastructure import TemplateData18from jinja.exceptions import FilterArgumentError, SecurityException192021_striptags_re = re.compile(r'(<!--.*?-->|<[^>]+>)')21_striptags_re = re.compile(r'(<!--.*?-->|<[^>]*>)')222324def stringfilter(f):25 """
959 unmodified lines
modified:jinja/parser.py+1 added-2 removed
508 unmodified lines
509 if self.stream.current.type in known_operators:510 op = self.stream.current.type511 self.stream.next()512 ops.append([op, self.parse_add_expression()])513 lineno = self.stream.lineno513 elif self.stream.current.type == 'not' and \514 self.stream.look().type == 'in':515 self.stream.skip(2)516 ops.append(['not in', self.parse_add_expression()])517 else:518 break519 if not ops:520 return expr522 return nodes.CompareExpression(expr, ops)521 return nodes.CompareExpression(expr, ops, lineno, self.filename)522523 def parse_add_expression(self):524 """525 Parse something like {{ foo + bar }}.
649 unmodified lines