Bind a pick to a name with {ref as n}, and read it with {n} and {n.path}

This commit is contained in:
2026-10-03 01:51:14 +02:00
committed by Lillem4n
parent ba9477f2e5
commit 23e426016d
16 changed files with 609 additions and 63 deletions
+9 -1
View File
@@ -163,7 +163,7 @@ func inlineBinding(n node, label string, root map[string]node) binding {
// linkNodeRefs binds the references in an inline node's templates against the
// loaded tree.
func linkNodeRefs(scope nodeScope, root map[string]node) error {
return scope(func(path string, m node) error {
if err := scope(func(path string, m node) error {
t, ok := m.(*template)
if !ok {
return nil
@@ -178,5 +178,13 @@ func linkNodeRefs(scope nodeScope, root map[string]node) error {
}
}
return linkTemplate(nil, path, "", t, root)
}); err != nil {
return err
}
return scope(func(path string, m node) error {
if t, ok := m.(*template); ok {
return linkNames(path, t)
}
return nil
})
}