mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
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:
parent
63fd1ffbff
commit
8a61a5470c
2 changed files with 2 additions and 1 deletions
|
@ -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>
|
||||||
|
|
||||||
********************
|
********************
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue