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