From eee6a69cc7dc4ec31f36a843b774970e070aed86 Mon Sep 17 00:00:00 2001 From: gedoor Date: Mon, 21 Sep 2020 23:59:16 +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 --- .../main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt | 5 +---- 1 file changed, 1 insertion(+), 4 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 a205d3893..81dfe2f61 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,9 +451,6 @@ 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()) ruleType.add(0) @@ -461,7 +458,7 @@ class AnalyzeRule(var book: BaseBook? = null) : JsExtensions { } tmp = evalMatcher.group() when { - tmp.startsWith("$") -> { + tmp.startsWith("$") && !rule.contains("##") -> { ruleType.add(tmp.substring(1).toInt()) ruleParam.add(tmp) }