Say at checkNodeFences that its scope's cycles are refused first

This commit is contained in:
2026-09-30 21:32:49 +02:00
committed by Lillem4n
parent 4ed4b10fa2
commit e9b8216116
2 changed files with 3 additions and 4 deletions
+3 -1
View File
@@ -230,7 +230,9 @@ func (b binding) bind() error {
// checkNodeFences runs the per-node fences every binding needs over a scope, each
// over the whole scope before the next, so which of several broken nodes is reported
// does not depend on the walk. Its walks terminate only where nothing renders itself.
// does not depend on the walk. Its walks recurse unguarded, so the scope's cycles are
// refused first: a tree by checkNoCycles, and an inline node closes none, since nothing
// references it.
func checkNodeFences(s nodeScope) error {
mem := renderCounts{}
if err := s(func(path string, n node) error { return repeatCheck(path, n, mem) }); err != nil {