Drop the unreachable reference-prefix checks

A name starting with ".." also starts with ".", so loadDir's hidden-entry
skip reaches it first and neither isRef branch could ever fire. Removed, and
the comment in named now names the skip that actually holds the invariant it
depends on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
M
2026-08-31 13:41:46 +02:00
committed by lilleman-tw
parent 25a3077925
commit 2dbc9b1f9f
2 changed files with 2 additions and 8 deletions
+2 -2
View File
@@ -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) {