mirror of https://github.com/Textualize/rich.git
Remove a possibly unecessary if/else
This commit is contained in:
parent
9f57640c48
commit
f13e452f67
|
@ -153,11 +153,8 @@ class Lines:
|
|||
):
|
||||
tokens.append(word)
|
||||
if index < len(spaces):
|
||||
if next_word is None:
|
||||
space_style = Style.null()
|
||||
else:
|
||||
style = word.get_style_at_offset(console, -1)
|
||||
next_style = next_word.get_style_at_offset(console, 0)
|
||||
space_style = style if style == next_style else line.style
|
||||
style = word.get_style_at_offset(console, -1)
|
||||
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))
|
||||
self[line_index] = Text("").join(tokens)
|
||||
|
|
Loading…
Reference in New Issue