epub converter: small fix

This commit is contained in:
shirshasa
2021-07-12 08:10:55 +03:00
parent 0127d73aed
commit a078a7a42a

View File

@@ -58,6 +58,8 @@ def update_src_links_in_images(body_tag: Tag,
del img.attrs['width']
if img.attrs.get('height'):
del img.attrs['height']
if img.attrs.get('style'):
del img.attrs['style']
return path2aws_path
@@ -233,16 +235,6 @@ def preprocess_footnotes(source_html_tag: Tag, href2soup_html: dict = None, note
return tags
def get_footnote_tags2str(t):
unicode_string = ''
for child in t.children:
if type(child) is NavigableString:
unicode_string += str(child)
else:
unicode_string += child.decode_contents()
return unicode_string.strip()
for i, noteref_tag in enumerate(noterefs_tags):
href = noteref_tag.attrs['href']
file, element_id = parse_a_tag_href(href)