forked from LiveCarta/BookConverter
epub converter: small fix
This commit is contained in:
@@ -58,6 +58,8 @@ def update_src_links_in_images(body_tag: Tag,
|
|||||||
del img.attrs['width']
|
del img.attrs['width']
|
||||||
if img.attrs.get('height'):
|
if img.attrs.get('height'):
|
||||||
del img.attrs['height']
|
del img.attrs['height']
|
||||||
|
if img.attrs.get('style'):
|
||||||
|
del img.attrs['style']
|
||||||
|
|
||||||
return path2aws_path
|
return path2aws_path
|
||||||
|
|
||||||
@@ -233,16 +235,6 @@ def preprocess_footnotes(source_html_tag: Tag, href2soup_html: dict = None, note
|
|||||||
|
|
||||||
return tags
|
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):
|
for i, noteref_tag in enumerate(noterefs_tags):
|
||||||
href = noteref_tag.attrs['href']
|
href = noteref_tag.attrs['href']
|
||||||
file, element_id = parse_a_tag_href(href)
|
file, element_id = parse_a_tag_href(href)
|
||||||
|
|||||||
Reference in New Issue
Block a user