Horis 2 лет назад
Родитель
Сommit
850c3b0b86

+ 3 - 4
app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt

@@ -53,7 +53,7 @@ class AnalyzeByJSoup(doc: Any) {
         if (list.isEmpty()) {
             return null
         }
-        if (list.size == 1){
+        if (list.size == 1) {
             return list.first()
         }
         return list.joinToString("\n")
@@ -375,12 +375,11 @@ class AnalyzeByJSoup(doc: Any) {
              * 根据索引集合筛选元素
              * */
             if (split == '!') { //排除
-                /*
+
                 for (pcInt in indexSet) elements[pcInt] = null
 
                 elements.removeAll(nullSet) //测试过,这样就行
-                */
-                for (pcInt in indexSet.toList().sortedDescending()) elements.removeAt(pcInt)
+
             } else if (split == '.') { //选择
 
                 val es = Elements()

+ 3 - 1
gradle/libs.versions.toml

@@ -20,7 +20,9 @@ lifecycle = "2.7.0"
 glide = "4.16.0"
 gson = "2.10.1"
 jsonPath = "2.9.0"
-jsoup = "1.17.2"
+# issue #3811,不要更新版本,新版引入了一个破坏性变更(详见https://github.com/jhy/jsoup/pull/2017)
+# 若要升级请确保相关代码不会受此变更影响(如AnalyzeByJSoup.kt、JsoupXpath库等)
+jsoup = "1.16.2"
 jsoupxpath = "2.5.3"
 coroutines = "1.8.0"
 liveeventbus = "1.8.14"