forked from LiveCarta/BookConverter
epub converter: update footnotes
This commit is contained in:
@@ -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)
|
expected_footnote_tags = verify_footnote_tag(expected_footnote_tags)
|
||||||
footnote_tag = expected_footnote_tags[0]
|
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)
|
replace_with_livecarta_anchor_tag(noteref_tag, i)
|
||||||
content = get_footnote_tags2str(footnote_tag)
|
content = footnote_tag.text
|
||||||
|
|
||||||
footnote_tag.decompose()
|
footnote_tag.decompose()
|
||||||
footnotes.append(content)
|
footnotes.append(content)
|
||||||
|
|||||||
Reference in New Issue
Block a user