mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 12:42:27 +08:00
fix: parse nested sub-rules
failed
This commit is contained in:
parent
cfc30753af
commit
f73f32e41c
@ -712,6 +712,9 @@ func parseRuleProviders(cfg *RawConfig) (ruleProviders map[string]providerTypes.
|
|||||||
|
|
||||||
func parseSubRules(cfg *RawConfig, proxies map[string]C.Proxy) (subRules map[string][]C.Rule, err error) {
|
func parseSubRules(cfg *RawConfig, proxies map[string]C.Proxy) (subRules map[string][]C.Rule, err error) {
|
||||||
subRules = map[string][]C.Rule{}
|
subRules = map[string][]C.Rule{}
|
||||||
|
for name := range cfg.SubRules {
|
||||||
|
subRules[name] = make([]C.Rule, 0)
|
||||||
|
}
|
||||||
for name, rawRules := range cfg.SubRules {
|
for name, rawRules := range cfg.SubRules {
|
||||||
if len(name) == 0 {
|
if len(name) == 0 {
|
||||||
return nil, fmt.Errorf("sub-rule name is empty")
|
return nil, fmt.Errorf("sub-rule name is empty")
|
||||||
|
Loading…
Reference in New Issue
Block a user