Show More
@@ -138,10 +138,12 b' class engine(object):' | |||||
138 | pos = n + 1 |
|
138 | pos = n + 1 | |
139 |
|
139 | |||
140 | if '%' in expr: |
|
140 | if '%' in expr: | |
|
141 | # the keyword should be formatted with a template | |||
141 | key, t = expr.split('%') |
|
142 | key, t = expr.split('%') | |
142 | parsed.append((self._format, (key.strip(), |
|
143 | parsed.append((self._format, (key.strip(), | |
143 | self._load(t.strip())))) |
|
144 | self._load(t.strip())))) | |
144 | elif '|' in expr: |
|
145 | elif '|' in expr: | |
|
146 | # process the keyword value with one or more filters | |||
145 | parts = expr.split('|') |
|
147 | parts = expr.split('|') | |
146 | val = parts[0].strip() |
|
148 | val = parts[0].strip() | |
147 | try: |
|
149 | try: | |
@@ -150,6 +152,7 b' class engine(object):' | |||||
150 | raise SyntaxError(_("unknown filter '%s'") % i[0]) |
|
152 | raise SyntaxError(_("unknown filter '%s'") % i[0]) | |
151 | parsed.append((self._filter, (filters, val))) |
|
153 | parsed.append((self._filter, (filters, val))) | |
152 | else: |
|
154 | else: | |
|
155 | # just get the keyword | |||
153 | parsed.append((self._get, expr.strip())) |
|
156 | parsed.append((self._get, expr.strip())) | |
154 |
|
157 | |||
155 | return parsed |
|
158 | return parsed |
General Comments 0
You need to be logged in to leave comments.
Login now