fix: flags not at the start of the expression

related issue: https://github.com/openedx/edx-platform/issues/33585
This commit is contained in:
Daniel Valenzuela
2023-10-25 20:16:44 -03:00
parent 72be4812bf
commit 115c65aa18

View File

@@ -17,11 +17,11 @@ def _prefix_only_url_replace_regex(pattern):
Match urls in quotes pulling out the fields from pattern
"""
return re.compile("""
(?x) # flags=re.VERBOSE
(?P<quote>\\\\?['"]) # the opening quotes
{}
(?P=quote) # the first matching closing quote
""".format(pattern))
""".format(pattern),
flags=re.VERBOSE)
def rewrite_nonportable_content_links(source_course_id, dest_course_id, text):