提交 4188fefa 编写于 作者: 泰斯特Test's avatar 泰斯特Test

[fix](common.py)修正「正则转义替换」函数的替换方式

上级 e9187b01
......@@ -114,9 +114,8 @@ def format_escapes(input, escapes=re_escapes):
if not isinstance(input, str):
return input
else:
for index, char in enumerate(input):
if char in escapes:
input = input.replace(char, '\\' + char)
for escape in escapes:
input = input.replace(escape, '\\' + escape)
return input
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册