templates: Fix handling of multiple defers in the same template

Fixes #13236
This commit is contained in:
Bjørn Erik Pedersen
2025-01-09 04:09:25 +01:00
parent b13d0a68e6
commit 61d3d20129
2 changed files with 28 additions and 0 deletions

View File

@@ -508,6 +508,7 @@ func (s *Site) executeDeferredTemplates(de *deps.DeferredExecutions) error {
}
content = append(content[:low], append([]byte(deferred.Result), content[high:]...)...)
forward = len(deferred.Result)
changed = true
return nil