Merge pull request #4141 from step21/master

Moving the flags of the compiled regex to the front, fixes #4137
This commit is contained in:
TW 2018-10-31 08:54:48 +01:00 committed by GitHub
commit c1380e4bb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,4 +62,4 @@ def translate(pat, match_end=r"\Z"):
else:
res += re.escape(c)
return res + match_end + "(?ms)"
return "(?ms)" + res + match_end