forked from LiveCarta/BookConverter
epub converter: fix links
This commit is contained in:
@@ -260,7 +260,7 @@ def unwrap_structural_tags(body_tag):
|
|||||||
# should be before other tags processing, not to remove converter empty tags with id
|
# should be before other tags processing, not to remove converter empty tags with id
|
||||||
# not all cases, if span has <p>s and NavigableString, it won't unwrap
|
# not all cases, if span has <p>s and NavigableString, it won't unwrap
|
||||||
for s in body_tag.find_all("span"):
|
for s in body_tag.find_all("span"):
|
||||||
if s.attrs.get('epub:type') == 'pagebreak':
|
if (s.attrs.get('epub:type') == 'pagebreak') or s.attrs.get('id'):
|
||||||
continue
|
continue
|
||||||
if s.contents:
|
if s.contents:
|
||||||
is_not_struct_tag = [child.name not in structural_tags_names for child in s.contents]
|
is_not_struct_tag = [child.name not in structural_tags_names for child in s.contents]
|
||||||
|
|||||||
Reference in New Issue
Block a user