Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
Support the superscript and subscript tags
  • Loading branch information
cowboysync authored Jan 18, 2024
1 parent e375689 commit def8b61
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions html2text/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,12 @@ def link_url(self: HTML2Text, link: str, title: str = "") -> None:
self.out("\n[/code]")
self.p()

if tag in ["sup", "sub"]:
if start:
self.o("<{}>".format(tag))
else:
self.o("</{}>".format(tag))

# TODO: Add docstring for these one letter functions
def pbr(self) -> None:
"Pretty print has a line break"
Expand Down

0 comments on commit def8b61

Please sign in to comment.