From 8ff476a3a1f2166d93bc0dda58b0350a970c3032 Mon Sep 17 00:00:00 2001 From: HolgerHuo Date: Tue, 31 Oct 2023 04:07:01 -0700 Subject: [PATCH] fix: remote logic rules cannot be parsed (#837) --- rules/provider/classical_strategy.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rules/provider/classical_strategy.go b/rules/provider/classical_strategy.go index e187e213..032204e4 100644 --- a/rules/provider/classical_strategy.go +++ b/rules/provider/classical_strategy.go @@ -76,7 +76,11 @@ func ruleParse(ruleRaw string) (string, string, []string) { } else if len(item) == 2 { return item[0], item[1], nil } else if len(item) > 2 { - return item[0], item[1], item[2:] + if item[0] == "NOT" || item[0] == "OR" || item[0] == "AND" || item[0] == "SUB-RULE" { + return item[0], strings.Join(item[1:len(item)], ","), nil + } else { + return item[0], item[1], item[2:] + } } return "", "", nil