Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions python/stringalign/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def __repr__(self) -> str:
def _repr_html_(self) -> str:
return self

def __add__(self, other: str) -> HtmlString:
return HtmlString(super().__add__(other))


def compress_css(css: str) -> str:
"""Simple compression of css that turns all whitespace into a single space.
Expand Down
5 changes: 5 additions & 0 deletions tests/visualize/HtmlString/test__add__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from stringalign.visualize import HtmlString


def test_returns_htmlstring():
assert isinstance(HtmlString("a") + HtmlString("b"), HtmlString)
Loading