forked from LiveCarta/BookConverter
Set up local docx_converter
This commit is contained in:
@@ -26,15 +26,13 @@ def preprocess_footnotes(source_html_tag: Tag, href2soup_html: dict = None, note
|
||||
<aside epub:type="footnote" id="n1"><p>With a footnote here.</p></aside>
|
||||
|
||||
"""
|
||||
footnotes = []
|
||||
footnotes, new_noterefs_tags, new_footnotes_tags = [], [], []
|
||||
noterefs_tags = source_html_tag.find_all(
|
||||
attrs={noteref_attr_name: "noteref"})
|
||||
bad_noterefs_tags = set(
|
||||
[tag for tag in noterefs_tags if not tag.attrs.get("href")])
|
||||
noterefs_tags = [
|
||||
tag for tag in noterefs_tags if tag not in bad_noterefs_tags]
|
||||
new_noterefs_tags = []
|
||||
new_footnotes_tags = []
|
||||
[tag.decompose() for tag in bad_noterefs_tags]
|
||||
|
||||
def parse_a_tag_href(s: str) -> Tuple[str, str]:
|
||||
|
||||
Reference in New Issue
Block a user