Skip to content
Snippets Groups Projects
Commit 9a721483 authored by Ned Batchelder's avatar Ned Batchelder
Browse files

Squash a regex warning

warnings.py:109 - /edx/app/edxapp/edx-platform/common/djangoapps/static_replace/__init__.py:76: DeprecationWarning: Flags not at the start of the expression '\n        (?x)       ' (truncated)
parent 4bc913e4
No related branches found
Tags release-2020-11-19-11.11
No related merge requests found
......@@ -23,8 +23,7 @@ def _url_replace_regex(prefix):
To anyone contemplating making this more complicated:
http://xkcd.com/1171/
"""
return u"""
(?x) # flags=re.VERBOSE
return """(?x) # flags=re.VERBOSE
(?P<quote>\\\\?['"]) # the opening quotes
(?P<prefix>{prefix}) # the prefix
(?P<rest>.*?) # everything else in the url
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment