优化
优化正则表达式检测,避免部分无意义表达式导致正文替换超时
This commit is contained in:
@@ -87,6 +87,10 @@ data class ReplaceRule(
|
||||
return false
|
||||
}
|
||||
}
|
||||
// Pattern.compile测试通过,但是部分情况下会替换超时,报错,一般发生在修改表达式时漏删了
|
||||
if (pattern.endsWith('|') and !pattern.endsWith("\\|")) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user