From de8fb74b8d27654dd9094e3cbe33972e6be3efab Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 17 Sep 2019 08:05:56 +0800 Subject: [PATCH] up --- .../io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 570262f17..33658de3c 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 @@ -20,16 +20,16 @@ class AnalyzeByJSoup { private var element: Element? = null fun parse(doc: Any): AnalyzeByJSoup { - if (doc is Element) { - element = doc + element = if (doc is Element) { + doc } else if (doc is JXNode) { if (doc.isElement) { - element = doc.asElement() + doc.asElement() } else { - element = Jsoup.parse(doc.value().toString()) + Jsoup.parse(doc.value().toString()) } } else { - element = Jsoup.parse(doc.toString()) + Jsoup.parse(doc.toString()) } return this }