epub converter: update footnotes

This commit is contained in:
shirshasa
2021-07-09 11:16:31 +03:00
parent 8eda9337ef
commit 776cf1ea12

View File

@@ -255,8 +255,10 @@ def preprocess_footnotes(source_html_tag: Tag, href2soup_html: dict = None, note
expected_footnote_tags = verify_footnote_tag(expected_footnote_tags)
footnote_tag = expected_footnote_tags[0]
if footnote_tag.parent.attrs.get('role') and footnote_tag.parent.attrs.get('role') == 'doc-endnote':
footnote_tag = footnote_tag.parent
replace_with_livecarta_anchor_tag(noteref_tag, i)
content = get_footnote_tags2str(footnote_tag)
content = footnote_tag.text
footnote_tag.decompose()
footnotes.append(content)