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