Skip to content

Commit 6284744

Browse files
committed
Small typo
1 parent f94a812 commit 6284744

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,11 @@ async def clean_data(self, key: str, val: typing.Any) -> typing.Tuple[str, str]:
186186
value_text = clean_value = hex_
187187

188188
except InvalidConfigError:
189-
name = re.sub(r"[\-. ]+", " ", str(val))
189+
name = str(val).lower()
190+
name = re.sub(r"[\-+|. ]+", " ", name)
190191
hex_ = ALL_COLORS.get(name)
191192
if hex_ is None:
192-
name = re.sub(r"\W", "", str(val))
193+
name = re.sub(r"[\-+|. ]+", "", name)
193194
hex_ = ALL_COLORS.get(name)
194195
if hex_ is None:
195196
raise

0 commit comments

Comments
 (0)