← oracle_full

rich_3471

resolved RESOLVED UNSUBMITTED PASS · None tool calls · 0 s · Textualize/rich

Task input

Fixed exception in append_tokens

Fixes https://github.com/Textualize/rich/issues/3014

Tool calls (0)

#ToolArgumentsResult
No trace captured.

Patch

--- a/rich/text.py
+++ b/rich/text.py
@@ -1041,6 +1041,7 @@ def append_tokens(
         _Span = Span
         offset = len(self)
         for content, style in tokens:
+            content = strip_control_codes(content)
             append_text(content)
             if style:
                 append_span(_Span(offset, offset + len(content), style))

Test output

show
........................................................................ [ 66%]
....................................                                     [100%]
108 passed in 0.20s