|
|
@ -413,14 +413,6 @@ class AnalyzeRule(val ruleData: RuleDataInterface) : JsExtensions { |
|
|
|
init { |
|
|
|
init { |
|
|
|
rule = when { |
|
|
|
rule = when { |
|
|
|
mode == Mode.Js || mode == Mode.Regex -> ruleStr |
|
|
|
mode == Mode.Js || mode == Mode.Regex -> ruleStr |
|
|
|
isRegex -> { |
|
|
|
|
|
|
|
mode = Mode.Regex |
|
|
|
|
|
|
|
ruleStr |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
isJSON || ruleStr.startsWith("$.") || ruleStr.startsWith("$[") -> { |
|
|
|
|
|
|
|
mode = Mode.Json |
|
|
|
|
|
|
|
ruleStr |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ruleStr.startsWith("@CSS:", true) -> { |
|
|
|
ruleStr.startsWith("@CSS:", true) -> { |
|
|
|
mode = Mode.Default |
|
|
|
mode = Mode.Default |
|
|
|
ruleStr |
|
|
|
ruleStr |
|
|
@ -441,6 +433,14 @@ class AnalyzeRule(val ruleData: RuleDataInterface) : JsExtensions { |
|
|
|
mode = Mode.Json |
|
|
|
mode = Mode.Json |
|
|
|
ruleStr.substring(6) |
|
|
|
ruleStr.substring(6) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
isJSON || ruleStr.startsWith("$.") || ruleStr.startsWith("$[") -> { |
|
|
|
|
|
|
|
mode = Mode.Json |
|
|
|
|
|
|
|
ruleStr |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
isRegex -> { |
|
|
|
|
|
|
|
mode = Mode.Regex |
|
|
|
|
|
|
|
ruleStr |
|
|
|
|
|
|
|
} |
|
|
|
else -> ruleStr |
|
|
|
else -> ruleStr |
|
|
|
} |
|
|
|
} |
|
|
|
//分离put |
|
|
|
//分离put |
|
|
|