forked from LiveCarta/BookConverter
save footnotes formatting
This commit is contained in:
@@ -462,7 +462,6 @@ class Book:
|
||||
@staticmethod
|
||||
def _clean_footnote_content(content):
|
||||
content = content.strip()
|
||||
content = re.sub(r'^\d+ ?', '', content)
|
||||
return content.strip()
|
||||
|
||||
def _process_footnotes(self):
|
||||
@@ -486,7 +485,8 @@ class Book:
|
||||
new_tag.string = '*'
|
||||
anc_tag.replace_with(new_tag)
|
||||
|
||||
content = self._clean_footnote_content(cont_tag.text)
|
||||
cont_tag.a.decompose()
|
||||
content = self._clean_footnote_content(cont_tag.p.decode_contents())
|
||||
cont_tag.decompose()
|
||||
|
||||
# new_tag = BeautifulSoup(features="lxml").new_tag('div')
|
||||
|
||||
Reference in New Issue
Block a user