Fix DeprecationWarning: invalid escape sequence '\w'

This commit is contained in:
Oleh Prypin 2022-09-29 16:55:15 +02:00 committed by Martin Donath
parent 98c32aa24d
commit dcbbfcfb5e
2 changed files with 2 additions and 2 deletions

View File

@ -355,7 +355,7 @@ class SocialPlugin(BasePlugin):
# Map available font weights to file paths
font = dict()
for file in files:
match = re.search("-(\w+)\.[ot]tf$", file)
match = re.search(r"-(\w+)\.[ot]tf$", file)
if match:
font[match.group(1)] = os.path.join(self.cache, file)

View File

@ -355,7 +355,7 @@ class SocialPlugin(BasePlugin):
# Map available font weights to file paths
font = dict()
for file in files:
match = re.search("-(\w+)\.[ot]tf$", file)
match = re.search(r"-(\w+)\.[ot]tf$", file)
if match:
font[match.group(1)] = os.path.join(self.cache, file)