Skip to content

Commit

Permalink
Update latex.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ihongda authored Dec 22, 2024
1 parent e30cbe5 commit 7661229
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions sutta_publisher/src/sutta_publisher/edition_parsers/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,7 @@ def _append_foreign_script_macro(self, tag: Tag) -> str:
def _append_footnote(self) -> str:
if self.endnotes:
_endnote = BeautifulSoup(self.endnotes.pop(0), "lxml")
# _contents = _endnote.p.contents if _endnote.p else _endnote.body.contents
if _endnote:
if _endnote.p:
_contents = _endnote.p.contents
elif _endnote.body:
_contents = _endnote.body.contents
else:
_contents = []
else:
_contents = []
_contents = _endnote.p.contents if _endnote.p else _endnote.body.contents
_data: str = self._process_contents(contents=_contents)
return cast(str, Command("footnote", _data).dumps())
else:
Expand Down

0 comments on commit 7661229

Please sign in to comment.