Show More
@@ -205,12 +205,6 b' def getlist(x):' | |||
|
205 | 205 | return getlist(x[1]) + [x[2]] |
|
206 | 206 | return [x] |
|
207 | 207 | |
|
208 | def getfilter(exp, context): | |
|
209 | f = getsymbol(exp) | |
|
210 | if f not in context._filters: | |
|
211 | raise error.ParseError(_("unknown function '%s'") % f) | |
|
212 | return context._filters[f] | |
|
213 | ||
|
214 | 208 | def gettemplate(exp, context): |
|
215 | 209 | if exp[0] == 'template': |
|
216 | 210 | return [compileexp(e, context, methods) for e in exp[1]] |
@@ -254,8 +248,11 b' def runtemplate(context, mapping, templa' | |||
|
254 | 248 | |
|
255 | 249 | def buildfilter(exp, context): |
|
256 | 250 | func, data = compileexp(exp[1], context, methods) |
|
257 |
|
|
|
258 | return (runfilter, (func, data, filt)) | |
|
251 | n = getsymbol(exp[2]) | |
|
252 | if n in context._filters: | |
|
253 | filt = context._filters[n] | |
|
254 | return (runfilter, (func, data, filt)) | |
|
255 | raise error.ParseError(_("unknown function '%s'") % n) | |
|
259 | 256 | |
|
260 | 257 | def runfilter(context, mapping, data): |
|
261 | 258 | func, data, filt = data |
General Comments 0
You need to be logged in to leave comments.
Login now