forked from LiveCarta/BookConverter
epub converter: add internal links processing2
This commit is contained in:
@@ -241,6 +241,8 @@ 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':
|
||||
continue
|
||||
if s.contents:
|
||||
is_not_struct_tag = [child.name not in structural_tags_names for child in s.contents]
|
||||
if all(is_not_struct_tag):
|
||||
|
||||
Reference in New Issue
Block a user