diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-08-02 19:53:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-02 19:53:16 +0200 |
| commit | 9b9c805cedb08621bd5dc58a01a6478eb7cc49a9 (patch) | |
| tree | d819686fbe32fecf4b7c73030f4b7b2f24990adc /django/contrib/staticfiles/storage.py | |
| parent | 7cd187a5ba58d7769039f487faeb9a5a2ff05540 (diff) | |
Removed unneeded escapes in regexes.
Special characters lose their special meaning inside sets of characters.
"-" lose its special meaning if it's placed as the first or last
character.
Follow up to 7c6b66383da5f9a67142334cd2ed2d769739e8f1.
Diffstat (limited to 'django/contrib/staticfiles/storage.py')
| -rw-r--r-- | django/contrib/staticfiles/storage.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/staticfiles/storage.py b/django/contrib/staticfiles/storage.py index 186f8d7535..85172ea42d 100644 --- a/django/contrib/staticfiles/storage.py +++ b/django/contrib/staticfiles/storage.py @@ -54,19 +54,19 @@ class HashedFilesMixin: ( ( r"""(?P<matched>import(?s:(?P<import>[\s\{].*?))""" - r"""\s*from\s*['"](?P<url>[\.\/].*?)["']\s*;)""" + r"""\s*from\s*['"](?P<url>[./].*?)["']\s*;)""" ), """import%(import)s from "%(url)s";""", ), ( ( r"""(?P<matched>export(?s:(?P<exports>[\s\{].*?))""" - r"""\s*from\s*["'](?P<url>[\.\/].*?)["']\s*;)""" + r"""\s*from\s*["'](?P<url>[./].*?)["']\s*;)""" ), """export%(exports)s from "%(url)s";""", ), ( - r"""(?P<matched>import\s*['"](?P<url>[\.\/].*?)["']\s*;)""", + r"""(?P<matched>import\s*['"](?P<url>[./].*?)["']\s*;)""", """import"%(url)s";""", ), ( |
