Properly handle nested tag executions when the nested tag has no body
This commit is contained in:
parent
89f75f1709
commit
4501ef63d6
2
salix.go
2
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)
|
||||
|
Loading…
Reference in New Issue
Block a user