Skip to content

Commit

Permalink
fix #194 (#195)
Browse files Browse the repository at this point in the history
* make sup tag inline

* add test for sup inline
  • Loading branch information
hudcap committed Apr 25, 2024
1 parent 9176ade commit 30da370
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions dominate/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ class sub(html_tag):


class sup(html_tag):
is_inline = True
'''
The sup element represents a superscript.
'''
Expand Down
3 changes: 3 additions & 0 deletions tests/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ def test_pretty():

assert p('goodbye ', i('cruel'), ' world').render() == \
'''<p>goodbye <i>cruel</i> world</p>'''

assert p('my 1', sup('st'), ' PR').render() == \
'''<p>my 1<sup>st</sup> PR</p>'''


def test_xhtml():
Expand Down

0 comments on commit 30da370

Please sign in to comment.