From 170007e89364b5dd9ec597edc19123f266b5c9ac Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 3 Aug 2019 00:47:05 +0800 Subject: [PATCH] up --- .../app/model/analyzeRule/AnalyzeRule.kt | 28 +------------------ 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt index 5c4fc6c7f..efb1c2f18 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt @@ -352,33 +352,6 @@ class AnalyzeRule(private var book: BaseBook? = null) { } return vResult } -// -// /** -// * 替换JS -// */ -// @SuppressLint("DefaultLocale") -// @Throws(Exception::class) -// private fun replaceJs(ruleStr: String): String { -// var vRuleStr = ruleStr -// if (vRuleStr.contains("{{") && vRuleStr.contains("}}")) { -// var jsEval: Any -// val sb = StringBuffer(vRuleStr.length) -// val expMatcher = EXP_PATTERN.matcher(vRuleStr) -// while (expMatcher.find()) { -// jsEval = evalJS(expMatcher.group(1), content) -// if (jsEval is String) { -// expMatcher.appendReplacement(sb, jsEval) -// } else if (jsEval is Double && jsEval % 1.0 == 0.0) { -// expMatcher.appendReplacement(sb, String.format("%.0f", jsEval)) -// } else { -// expMatcher.appendReplacement(sb, jsEval.toString()) -// } -// } -// expMatcher.appendTail(sb) -// vRuleStr = sb.toString() -// } -// return vRuleStr -// } /** * 分解规则生成规则列表 @@ -491,6 +464,7 @@ class AnalyzeRule(private var book: BaseBook? = null) { } //分离put rule = splitPutRule(rule, putMap) + //get替换 rule = replaceGet(rule) // 拆分表达式替换规则 AnalyzeByRegex.splitRegexRule(rule, ruleParam, ruleType)