diff --git a/rich/containers.py b/rich/containers.py index 67385aa9..4a8c26db 100644 --- a/rich/containers.py +++ b/rich/containers.py @@ -148,7 +148,6 @@ class Lines: num_spaces += 1 index = (index + 1) % len(spaces) tokens: List[Text] = [] - index = 0 for index, (word, next_word) in enumerate( zip_longest(words, words[1:]) ): @@ -161,5 +160,4 @@ class Lines: next_style = next_word.get_style_at_offset(console, 0) space_style = style if style == next_style else line.style tokens.append(Text(" " * spaces[index], style=space_style)) - index += 1 self[line_index] = Text("").join(tokens)