mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-06 15:25:05 +01:00
Render plain text comments in book file metadata as HTML
This commit is contained in:
parent
e3e588c901
commit
05ccd5c348
1 changed files with 3 additions and 0 deletions
|
|
@ -318,6 +318,9 @@ def process_field(field, fm):
|
|||
add_row(name, val)
|
||||
return
|
||||
val = E.span(val).outerHTML
|
||||
else:
|
||||
if field is 'comments' and '<' not in val:
|
||||
val = '\n'.join(['<p class="description">{}</p>'.format(x.pyreplace('\n', '<br>')) for x in val.split('\n\n')])
|
||||
if hp is 'side':
|
||||
add_row(name, val, is_html=True)
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue