Hold only an expansion's names in formatOps.held, deleting keepsHold

This commit is contained in:
2026-09-29 16:18:13 +02:00
committed by Lillem4n
parent 14952d0c06
commit dee1e186e3
5 changed files with 13 additions and 19 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ func expand(s *generatorState, t *template, sc renderScope) string {
// repeat iteration get their own, since each is its own expansion. A reference
// path reads its draw group's memo in sc instead.
var hold *drawMemo
if t.compiled.keepsHold {
if len(t.compiled.held) > 0 {
hold = &drawMemo{
variant: make(map[string]node, len(t.compiled.held)),
value: make(map[string]readValue, len(t.compiled.held)),