From a3dbb32812c217aad43debb66db922b11db875cf Mon Sep 17 00:00:00 2001 From: bushixuanqi <57338301+bushixuanqi@users.noreply.github.com> Date: Mon, 5 Jul 2021 13:59:05 +0800 Subject: [PATCH] Update RuleAnalyzer.kt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 搞错了,那两个不是逻辑错误 --- .../main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt b/app/src/main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt index d90b58a79..e2f08660f 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt @@ -277,7 +277,7 @@ class RuleAnalyzer(data: String) { if(st == -1) { - var rule = arrayOf(queue.substring(start, pos)) //压入分隔的首段规则到数组 + var rule = arrayOf(queue.substring(0, pos)) //压入分隔的首段规则到数组 elementsType = queue.substring(pos, pos + step) //设置组合类型 pos += step //跳过分隔符 @@ -294,7 +294,7 @@ class RuleAnalyzer(data: String) { val rule = if(st >pos ){ //先匹配到st1pos,表明分隔字串不在选择器中,将选择器前分隔字串分隔的字段依次压入数组 - var rule = arrayOf(queue.substring(start, pos)) //压入分隔的首段规则到数组 + var rule = arrayOf(queue.substring(0, pos)) //压入分隔的首段规则到数组 elementsType = queue.substring(pos, pos + step) //设置组合类型 pos += step //跳过分隔符