diff --git a/dominate/tags.py b/dominate/tags.py index 1b1a044..4d80929 100644 --- a/dominate/tags.py +++ b/dominate/tags.py @@ -589,6 +589,7 @@ class sub(html_tag): class sup(html_tag): + is_inline = True ''' The sup element represents a superscript. ''' diff --git a/tests/test_html.py b/tests/test_html.py index 50ecf8b..fdab1f5 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -329,6 +329,9 @@ def test_pretty(): assert p('goodbye ', i('cruel'), ' world').render() == \ '''

goodbye cruel world

''' + + assert p('my 1', sup('st'), ' PR').render() == \ + '''

my 1st PR

''' def test_xhtml():