Update AnalyzeByJSoup.kt

扩大索引向前的匹配范围,索引前无规则时相当于前面的规则是children
pull/1099/head
bushixuanqi 3 years ago committed by GitHub
parent 0978ff83fd
commit d01d77fc4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt

@ -219,7 +219,7 @@ class AnalyzeByJSoup(doc: Any) {
len-- //跳过尾部']' len-- //跳过尾部']'
while (len-- > 0) { //逆向遍历,至少有一位前置字符,如 [ while (len-- >= 0) { //逆向遍历,可以无前置规则
var rl = rus[len] var rl = rus[len]
if (rl == ' ') continue //跳过空格 if (rl == ' ') continue //跳过空格
@ -265,7 +265,7 @@ class AnalyzeByJSoup(doc: Any) {
curMinus = false //重置 curMinus = false //重置
} }
} }
} else while (len --> 0) { //阅读原本写法,逆向遍历,至少两位前置字符,如 . } else while (len-- >= 0) { //阅读原本写法,逆向遍历,可以无前置规则
val rl = rus[len] val rl = rus[len]
if (rl == ' ') continue //跳过空格 if (rl == ' ') continue //跳过空格

Loading…
Cancel
Save