diff --git a/data.go b/data.go index 457dce2..73ed80c 100644 --- a/data.go +++ b/data.go @@ -61,9 +61,6 @@ func loadDir(dir string) (*group, error) { } full := filepath.Join(dir, e.Name()) if e.IsDir() { - if isRef(e.Name()) { - return nil, fmt.Errorf("%s: folder %q starts with %q, which is reserved for {..path} bindings", full, e.Name(), refPrefix) - } child, err := loadDir(full) if err != nil { return nil, err @@ -81,9 +78,6 @@ func loadDir(dir string) (*group, error) { continue } name := strings.TrimSuffix(e.Name(), ".json") - if isRef(name) { - return nil, fmt.Errorf("%s: category %q starts with %q, which is reserved for {..path} bindings", full, name, refPrefix) - } if err := checkName(name); err != nil { return nil, fmt.Errorf("%s: category %w", full, err) } diff --git a/reference.go b/reference.go index 5bee46c..25d2a3d 100644 --- a/reference.go +++ b/reference.go @@ -170,8 +170,8 @@ func contained(n node) []namedNode { // named skips a bound {..path} key: it is a render edge, not containment, so using // it as a path segment would report a node under a path that does not reach it. Only -// a template's fields hold bindings — loadDir rejects a category or folder carrying -// the prefix — so this one skip serves a group's children too. +// a template's fields hold bindings — loadDir skips a dot-prefixed entry, so a +// group's children never carry the prefix — so this one skip serves both. func named(m map[string]node) []namedNode { out := make([]namedNode, 0, len(m)) for _, name := range sortedNames(m) {