Moving the flags of the compiled regex to the front to fix #4137

This commit is contained in:
step21 2018-10-31 07:56:16 +01:00
parent 1183ea91fa
commit 47490c79be

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