Replay each path's selectors through the walk for the family fence, require a key for a name, refuse a name shadowing a key, a table reading its own family and an ancestor's column clash, add the row node and family.go, and pin eight rows inline
Tests / vet + fmt + tests (pull_request) Successful in 1m8s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped

This commit is contained in:
2026-09-17 12:54:24 +02:00
parent fb83aa6178
commit 047237f361
14 changed files with 419 additions and 277 deletions
+5 -7
View File
@@ -25,10 +25,8 @@ func (f *Generator) Fake(path string) (string, error) {
}
f.set = drawSet{unnamed: draws{s: f.rand}}
sc := drawScope{set: &f.set}
if f.root == nil {
f.root = &folder{children: f.categories}
}
n, err := descend(f.rand, f.root, segments, sc)
f.root.children = f.categories
n, err := descend(f.rand, &f.root, segments, sc)
if err != nil {
return "", fmt.Errorf("fejkdata: %s: %w", path, err)
}
@@ -60,13 +58,13 @@ func render(s *session, n node, sc drawScope) string {
case *table:
sc.t, sc.row = n, n.draw(s)
return expand(s, n.format, sc)
case *row:
sc.t, sc.row = n.t, sc.draws(s).mustRow(n.t)
return expand(s, n.t.format, sc)
case *column:
if sc.t != n.t {
sc.t, sc.row = n.t, sc.draws(s).mustRow(n.t)
}
if n.i < 0 {
return expand(s, n.t.format, sc)
}
if cell := n.t.cellNode(sc.row, n.i); cell != nil {
return render(s, cell, sc)
}