From e3cce8cafddc099215c6a8d3f4e6090b8b9e6331 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 8 Nov 2019 18:33:18 +0800 Subject: [PATCH] up --- .../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 27b0b209e..ed5712d89 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 @@ -470,7 +470,7 @@ class AnalyzeRule(private var book: BaseBook? = null) { var tmp: String val evalMatcher = evalPattern.matcher(rule) while (evalMatcher.find()) { - if (mode == Mode.Default) { + if (mode != Mode.Js) { mode = Mode.Regex } if (evalMatcher.start() > start) { @@ -560,9 +560,9 @@ class AnalyzeRule(private var book: BaseBook? = null) { private fun isRule(ruleStr: String): Boolean { return when { ruleStr.startsWith("$.") -> true - ruleStr.startsWith("@XPath:", true) -> true - ruleStr.startsWith("//") -> true ruleStr.startsWith("@Json:", true) -> true + ruleStr.startsWith("//") -> true + ruleStr.startsWith("@XPath:", true) -> true ruleStr.startsWith("@CSS:", true) -> true ruleStr.startsWith("@@") -> true else -> false