So I looked at the code of the Template function (for build a 'IFELSE') and I just saw the 'IF' code is that:
Code:
def evaluate(self, formatter, kwargs, mi, locals, x, y, re):
if val:
return val
It's very strange, it shouldn't rather be :
Code:
def evaluate(self, formatter, kwargs, mi, locals, x, y, re):
if x == y:
return re
calibre 5.7.2
(I sincerely hope I'm wrong, otherwise there's a very old bug.)