Show More
@@ -139,17 +139,18 b' class engine(object):' | |||
|
139 | 139 | |
|
140 | 140 | if '%' in expr: |
|
141 | 141 | key, t = expr.split('%') |
|
142 |
parsed.append((self._format, (key, |
|
|
142 | parsed.append((self._format, (key.strip(), | |
|
143 | self._load(t.strip())))) | |
|
143 | 144 | elif '|' in expr: |
|
144 | 145 | parts = expr.split('|') |
|
145 | val = parts[0] | |
|
146 | val = parts[0].strip() | |
|
146 | 147 | try: |
|
147 | filters = [self._filters[f] for f in parts[1:]] | |
|
148 | filters = [self._filters[f.strip()] for f in parts[1:]] | |
|
148 | 149 | except KeyError, i: |
|
149 | 150 | raise SyntaxError(_("unknown filter '%s'") % i[0]) |
|
150 | 151 | parsed.append((self._filter, (filters, val))) |
|
151 | 152 | else: |
|
152 | parsed.append((self._get, expr)) | |
|
153 | parsed.append((self._get, expr.strip())) | |
|
153 | 154 | |
|
154 | 155 | return parsed |
|
155 | 156 |
General Comments 0
You need to be logged in to leave comments.
Login now