mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Allow blanks lines in the template
This commit is contained in:
parent
761b32b99f
commit
8bc842ddb2
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user