One fence sequence over a node scope, and inline templates reject the folder sigils

This commit is contained in:
2026-09-03 20:34:42 +02:00
parent 7c7bee5cd9
commit 80e8d72bb7
5 changed files with 41 additions and 51 deletions
+1 -7
View File
@@ -62,19 +62,13 @@ func loadData(sources []dataSource) (map[string]node, error) {
if len(root) == 0 {
return nil, fmt.Errorf("no .json data found")
}
// The fences here and the scoped ones [Generator.NewTemplate] runs are one
// sequence split across two entry points; a new fence lands a twin below and
// in NewTemplate (see its comment for the one omission, checkNoCycles).
if err := linkRefs(root); err != nil {
return nil, err
}
if err := checkNoCycles(root); err != nil {
return nil, err
}
if err := checkRepeatReach(root); err != nil {
return nil, err
}
if err := checkBoundLevelsHeld(root); err != nil {
if err := checkScope(treeScope(root)); err != nil {
return nil, err
}
return root, nil