Resolve Python regex library warnings (#4012)

* Resolve Python regex library warnings

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>

* Add CONTRIBUTORS

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
This commit is contained in:
Emmanuel Ferdman 2025-05-19 06:29:54 +03:00 committed by GitHub
parent 63fd1ffbff
commit 8a61a5470c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -229,6 +229,7 @@ Yaoliang Chen <yaoliang.ch@gmail.com>
KolbyML <https://github.com/KolbyML> KolbyML <https://github.com/KolbyML>
Adnane Taghi <dev@soleuniverse.me> Adnane Taghi <dev@soleuniverse.me>
Spiritual Father <https://github.com/spiritualfather> Spiritual Father <https://github.com/spiritualfather>
Emmanuel Ferdman <https://github.com/emmanuel-ferdman>
******************** ********************

View file

@ -38,7 +38,7 @@ with open(input_path, "r") as f:
if "fill" in data: if "fill" in data:
data = re.sub(r"fill=\"#.+?\"", f'fill="{color[mode]}"', data) data = re.sub(r"fill=\"#.+?\"", f'fill="{color[mode]}"', data)
else: else:
data = re.sub(r"<svg", f'<svg fill="{color[mode]}"', data, 1) data = re.sub(r"<svg", f'<svg fill="{color[mode]}"', data, count=1)
with open(filename, "w") as f: with open(filename, "w") as f:
f.write(data) f.write(data)