visit = func(s Spec) {
if bs, ok := s.(blockSpec); ok {
for _, blockS := range bs.blockHeaderSchemata() {
- ret[blockS.Type] = bs.nestedSpec()
+ nested := bs.nestedSpec()
+ if nested != nil { // nil can be returned to dynamically opt out of this interface
+ ret[blockS.Type] = nested
+ }
}
}