Skip to content

Commit 1b912fa

Browse files
committed
optimization
1 parent ef6a0f1 commit 1b912fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/textual/content.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,9 @@ def plain(self) -> str:
705705
@property
706706
def without_spans(self) -> Content:
707707
"""The content with no spans"""
708-
return Content(self.plain, [], self._cell_length)
708+
if self._spans:
709+
return Content(self.plain, [], self._cell_length)
710+
return self
709711

710712
@property
711713
def first_line(self) -> Content:

0 commit comments

Comments
 (0)