mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 03:32:33 +08:00
fix: subrule can't recursion correctly (#1339)
Some checks are pending
Trigger CMFA Update / trigger-CMFA-update (push) Waiting to run
Some checks are pending
Trigger CMFA Update / trigger-CMFA-update (push) Waiting to run
This commit is contained in:
parent
50286678bf
commit
a9ecc627e6
|
@ -2,12 +2,13 @@ package logic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
list "github.com/bahlo/generic-list-go"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
C "github.com/metacubex/mihomo/constant"
|
C "github.com/metacubex/mihomo/constant"
|
||||||
"github.com/metacubex/mihomo/rules/common"
|
"github.com/metacubex/mihomo/rules/common"
|
||||||
|
|
||||||
|
list "github.com/bahlo/generic-list-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Logic struct {
|
type Logic struct {
|
||||||
|
@ -243,7 +244,7 @@ func matchSubRules(metadata *C.Metadata, name string, subRules map[string][]C.Ru
|
||||||
for _, rule := range subRules[name] {
|
for _, rule := range subRules[name] {
|
||||||
if m, a := rule.Match(metadata); m {
|
if m, a := rule.Match(metadata); m {
|
||||||
if rule.RuleType() == C.SubRules {
|
if rule.RuleType() == C.SubRules {
|
||||||
matchSubRules(metadata, rule.Adapter(), subRules)
|
return matchSubRules(metadata, rule.Adapter(), subRules)
|
||||||
} else {
|
} else {
|
||||||
return m, a
|
return m, a
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user