Skip to content

Commit 93738b6

Browse files
committed
another edge case
1 parent f2b0da6 commit 93738b6

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/textual/markup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ def process_text(template_text: str, /) -> str:
419419
[
420420
Span(position, text_length, tag_body)
421421
for position, tag_body, _ in reversed(style_stack)
422+
if position != text_length
422423
]
423424
)
424425
spans.reverse()

tests/test_markup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
141141
("[bold][/]", Content("")),
142142
("[bold]", Content("")),
143143
("", Content("")),
144+
("[red][green][/red]", Content("")),
144145
],
145146
)
146147
def test_to_content(markup: str, content: Content):

0 commit comments

Comments
 (0)