Fix extraneous space

This commit is contained in:
Isaiah Odhner 2023-06-09 21:39:30 -04:00
parent 9f283458bf
commit bb9042a6c0

View File

@ -754,7 +754,7 @@ class NodeInfo(Container):
color = Color.parse(possible_color) color = Color.parse(possible_color)
# value_text = Text.styled(possible_color, f"on {value_text}") # doesn't handle all Textual Color values, only Rich Color values # value_text = Text.styled(possible_color, f"on {value_text}") # doesn't handle all Textual Color values, only Rich Color values
value_text = Text.styled(possible_color, Style.from_color(bgcolor=color.rich_color, color=color.get_contrast_text().rich_color)) value_text = Text.styled(possible_color, Style.from_color(bgcolor=color.rich_color, color=color.get_contrast_text().rich_color))
value_text = Text.assemble(optional_keyword, " ", value_text) value_text = Text.assemble(optional_keyword, " " if optional_keyword else "", value_text)
except ColorParseError: except ColorParseError:
pass pass
return Text.assemble( return Text.assemble(