From 98de63b04c031b78fde46d46bb882d7fbf123417 Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 23 Sep 2020 07:57:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=84=E5=88=99=E8=A7=A3?= =?UTF-8?q?=E6=9E=90bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/model/analyzeRule/AnalyzeRule.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt index 530dcb33b..d7555c951 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt @@ -451,6 +451,9 @@ 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()) splitRegex(tmp) @@ -483,9 +486,6 @@ class AnalyzeRule(var book: BaseBook? = null) : JsExtensions { val ruleStrArray = ruleStr.split("##") val regexMatcher = regexPattern.matcher(ruleStrArray[0]) while (regexMatcher.find()) { - if (mode != Mode.Js) { - mode = Mode.Regex - } if (regexMatcher.start() > start) { tmp = ruleStr.substring(start, regexMatcher.start()) ruleType.add(0)