From 16d2c9bfa09c456007d3a6a6c1e3baad9c94775e Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 24 Jul 2019 22:17:21 +0800 Subject: [PATCH] up --- .../java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt index 916fd0ff9..fb9c9c3b5 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt @@ -17,6 +17,8 @@ import java.util.* */ class AnalyzeByJSoup { + private val validKeys = listOf("class", "id", "tag", "text") + private var element: Element? = null fun parse(doc: Any): AnalyzeByJSoup { @@ -211,7 +213,6 @@ class AnalyzeByJSoup { if (needFilterElements) { filterRules = rulePc[1].trim { it <= ' ' }.splitNotBlank(".") filterRules[0] = filterRules[0].trim { it <= ' ' } - val validKeys = listOf("class", "id", "tag", "text") if (filterRules.size < 2 || !validKeys.contains(filterRules[0]) || isEmpty(filterRules[1].trim { it <= ' ' })) { needFilterElements = false }