mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix bug in template function subitems that allowed empty items in the returned value
This commit is contained in:
parent
8e98cb061f
commit
456adc2f2b
@ -1082,9 +1082,11 @@ class BuiltinSubitems(BuiltinFormatterFunction):
|
|||||||
components = [item]
|
components = [item]
|
||||||
try:
|
try:
|
||||||
if ei == 0:
|
if ei == 0:
|
||||||
rv.add('.'.join(components[si:]))
|
t = '.'.join(components[si:]).strip()
|
||||||
else:
|
else:
|
||||||
rv.add('.'.join(components[si:ei]))
|
t = '.'.join(components[si:ei]).strip()
|
||||||
|
if t:
|
||||||
|
rv.add(t)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
return ', '.join(sorted(rv, key=sort_key))
|
return ', '.join(sorted(rv, key=sort_key))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user