epub converter: fix links

This commit is contained in:
shirshasa
2021-06-03 11:41:35 +03:00
parent a3b2343a7c
commit 2506da20be

View File

@@ -260,7 +260,7 @@ def unwrap_structural_tags(body_tag):
# 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
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
if s.contents:
is_not_struct_tag = [child.name not in structural_tags_names for child in s.contents]