Add some tests

This commit is contained in:
2023-11-03 23:36:41 -07:00
parent 979e7aa33e
commit 6c23c75906
3 changed files with 281 additions and 0 deletions

View File

@@ -103,6 +103,10 @@ func (t Template) Execute(w io.Writer) error {
}
func (t *Template) execute(w io.Writer, nodes []ast.Node, local map[string]any) error {
if local == nil {
local = map[string]any{}
}
for i := 0; i < len(nodes); i++ {
switch node := nodes[i].(type) {
case ast.Text: