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