Allow blanks lines in the template

This commit is contained in:
Kovid Goyal 2017-07-18 11:43:45 +05:30
parent 761b32b99f
commit 8bc842ddb2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -44,6 +44,7 @@ def default_template():
_('{series_index} of <i>{series}</i>') + '|||{rating}',
'{tags}',
_('Date: {timestamp}') + '|||' + _('Published: {pubdate}') + '|||' + _('Publisher: {publisher}'),
'',
]
}
return default_template.ans
@ -204,6 +205,7 @@ def render_part(part, template, book_id, metadata):
def render_line(line, template, book_id, metadata):
parts = v'[]'
line = line or '\xa0'
for p in line.split(/\|\|\|/):
part = render_part(p, template, book_id, metadata)
if part: