mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix the NOT function.
This commit is contained in:
parent
da9aef6c58
commit
87c178accb
@ -727,13 +727,8 @@ class BuiltinNot(BuiltinFormatterFunction):
|
|||||||
'returns the empty string. This function works well with test or '
|
'returns the empty string. This function works well with test or '
|
||||||
'first_non_empty. You can have as many values as you want.')
|
'first_non_empty. You can have as many values as you want.')
|
||||||
|
|
||||||
def evaluate(self, formatter, kwargs, mi, locals, *args):
|
def evaluate(self, formatter, kwargs, mi, locals, val):
|
||||||
i = 0
|
return '' if val else '1'
|
||||||
while i < len(args):
|
|
||||||
if args[i]:
|
|
||||||
return '1'
|
|
||||||
i += 1
|
|
||||||
return ''
|
|
||||||
|
|
||||||
class BuiltinMergeLists(BuiltinFormatterFunction):
|
class BuiltinMergeLists(BuiltinFormatterFunction):
|
||||||
name = 'merge_lists'
|
name = 'merge_lists'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user