mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-07 09:01:38 -04:00
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
35e5985b7e
@ -499,13 +499,14 @@ class TemplateFormatter(string.Formatter):
|
||||
|
||||
########## a formatter that throws exceptions ############
|
||||
|
||||
def unsafe_format(self, fmt, kwargs, book):
|
||||
def unsafe_format(self, fmt, kwargs, book, strip_results=True):
|
||||
self.strip_results = strip_results
|
||||
self.column_name = self.template_cache = None
|
||||
self.kwargs = kwargs
|
||||
self.book = book
|
||||
self.composite_values = {}
|
||||
self.locals = {}
|
||||
return self.evaluate(fmt, [], kwargs).strip()
|
||||
return self.evaluate(fmt, [], kwargs)
|
||||
|
||||
########## a formatter guaranteed not to throw an exception ############
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user