From 4501ef63d63d278c1b1bd35e2a58ff6f17ca5241 Mon Sep 17 00:00:00 2001 From: Elara6331 Date: Sat, 17 Feb 2024 19:36:40 -0800 Subject: [PATCH] Properly handle nested tag executions when the nested tag has no body --- salix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salix.go b/salix.go index d41114a..18ac3f6 100644 --- a/salix.go +++ b/salix.go @@ -166,7 +166,7 @@ func (t *Template) getBlock(nodes []ast.Node, offset, startLine int, name string // If we encounter another tag with the same name, // increment tagAmount so that we know that the next // end tag isn't the end of this tag. - if node.Name.Value == name { + if node.Name.Value == name && node.HasBody { tagAmount++ } out = append(out, node)