Render a repeat iteration in no group, refuse a group that names nothing, key group names by category, and own reference overlap in one fence
Tests / vet + fmt + tests (pull_request) Successful in 1m6s
Tests / vet + fmt + tests (pull_request) Successful in 1m6s
This commit is contained in:
@@ -136,6 +136,9 @@ func inputValue(input string) (any, error) {
|
||||
// bindInline links an inline node's references against root and runs check over it, naming its
|
||||
// nodes from label.
|
||||
func bindInline(n node, label string, root map[string]node, check func(nodeScope) error) error {
|
||||
if t, isTemplate := n.(*template); isTemplate && t.group != "" {
|
||||
return fmt.Errorf("%s: group %q names nothing, since nothing can reference an inline template; drop it", label, t.group)
|
||||
}
|
||||
scope := inlineScope(n, label)
|
||||
if err := linkNodeRefs(scope, root); err != nil {
|
||||
return err
|
||||
@@ -151,6 +154,7 @@ func linkNodeRefs(scope nodeScope, root map[string]node) error {
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
t.keyGroup("")
|
||||
for _, name := range refTokens(t.format) {
|
||||
sigil, rest, err := refShape(name)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user