Update AnalyzeByJSoup.kt

查找是否存在索引列表时,当区间与当前数字都空时跳出,避免jsoup选择器被当做索引列表而导致出错。
pull/1102/head
bushixuanqi 3 years ago committed by GitHub
parent d148ba98d4
commit 9e6ecbf2ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt

@ -237,7 +237,12 @@ class AnalyzeByJSoup(doc: Any) {
else -> {
//为保证查找顺序,区间和单个索引都添加到同一集合
if(curList.isEmpty())indexSet.indexs.add(curInt!!)
if(curList.isEmpty()) {
if(curInt == null) break //是jsoup选择器而非索引列表,跳出
indexSet.indexs.add(curInt)
}
else{
//列表最后压入的是区间右端,若列表有两位则最先压入的是间隔

Loading…
Cancel
Save