mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix template program regression triggered by recursively calling the processor
This commit is contained in:
parent
4325a82e82
commit
b22e640b50
@ -186,7 +186,7 @@ class BuiltinTemplate(BuiltinFormatterFunction):
|
|||||||
|
|
||||||
def evaluate(self, formatter, kwargs, mi, locals, template):
|
def evaluate(self, formatter, kwargs, mi, locals, template):
|
||||||
template = template.replace('[[', '{').replace(']]', '}')
|
template = template.replace('[[', '{').replace(']]', '}')
|
||||||
return formatter.safe_format(template, kwargs, 'TEMPLATE', mi)
|
return formatter.__class__().safe_format(template, kwargs, 'TEMPLATE', mi)
|
||||||
|
|
||||||
class BuiltinEval(BuiltinFormatterFunction):
|
class BuiltinEval(BuiltinFormatterFunction):
|
||||||
name = 'eval'
|
name = 'eval'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user