1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-04 03:33:33 +02:00

Re added (probably) right formating codes.

This commit is contained in:
2021-06-22 22:06:09 +02:00
parent 546cc26652
commit 84abd62a61
18 changed files with 39 additions and 58 deletions

View File

@@ -239,7 +239,7 @@ def parse_html(data, log=None, decoder=None, preprocessor=None,
if barename(data.tag) != 'html':
if barename(data.tag) in non_html_file_tags:
raise NotHTML(data.tag)
log.warning('File %s does not appear to be (X)HTML', filename)
log.warning('File %r does not appear to be (X)HTML', filename)
nroot = etree.fromstring('<html></html>')
has_body = False
for child in list(data):
@@ -248,7 +248,7 @@ def parse_html(data, log=None, decoder=None, preprocessor=None,
break
parent = nroot
if not has_body:
log.warning('File %s appears to be a HTML fragment', filename)
log.warning('File %r appears to be a HTML fragment', filename)
nroot = etree.fromstring('<html><body/></html>')
parent = nroot[0]
for child in list(data.iter()):