修复规则解析bug

pull/395/head
gedoor 4 years ago
parent c06c26a36f
commit 6b6a39e07d
  1. 6
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt

@ -451,11 +451,11 @@ class AnalyzeRule(var book: BaseBook? = null) : JsExtensions {
var tmp: String
val evalMatcher = evalPattern.matcher(rule)
while (evalMatcher.find()) {
if (mode != Mode.Js) {
mode = Mode.Regex
}
if (evalMatcher.start() > start) {
tmp = rule.substring(start, evalMatcher.start())
if (start == 0 && !tmp.contains("##") && mode != Mode.Js) {
mode = Mode.Regex
}
splitRegex(tmp)
}
tmp = evalMatcher.group()

Loading…
Cancel
Save