|
|
|
@ -190,6 +190,7 @@ class AnalyzeRule(var book: BaseBook? = null) { |
|
|
|
|
putRule(sourceRule.putMap) |
|
|
|
|
sourceRule.makeUpRule(result) |
|
|
|
|
result?.let { |
|
|
|
|
if (sourceRule.rule.isNotBlank() || sourceRule.replaceRegex.isEmpty()) { |
|
|
|
|
result = when (sourceRule.mode) { |
|
|
|
|
Mode.Js -> evalJS(sourceRule.rule, it) |
|
|
|
|
Mode.Json -> getAnalyzeByJSonPath(it).getString(sourceRule.rule) |
|
|
|
@ -201,6 +202,7 @@ class AnalyzeRule(var book: BaseBook? = null) { |
|
|
|
|
} |
|
|
|
|
else -> sourceRule.rule |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (sourceRule.replaceRegex.isNotEmpty()) { |
|
|
|
|
result = replaceRegex(result.toString(), sourceRule) |
|
|
|
|
} |
|
|
|
|