FB2 Output: Annotation should be wrapped in p

This commit is contained in:
Andrey Efremov 2019-10-07 12:28:49 +07:00
parent d02966423c
commit 0c1ca17192

View File

@ -197,7 +197,7 @@ class FB2MLizer(object):
metadata['comments'] = '' metadata['comments'] = ''
else: else:
from calibre.utils.html2text import html2text from calibre.utils.html2text import html2text
metadata['comments'] = '<annotation>{}</annotation>'.format(prepare_string_for_xml(html2text(comments.value.strip()))) metadata['comments'] = '<annotation><p>{}</p></annotation>'.format(prepare_string_for_xml(html2text(comments.value).strip()))
header = textwrap.dedent('''\ header = textwrap.dedent('''\
<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink"> <FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink">