fix(template): provide template as name

This commit is contained in:
Jan De Dobbeleer 2022-07-12 11:10:21 +02:00 committed by Jan De Dobbeleer
parent 1a03a6d9e8
commit b4d82c6037

View file

@ -44,7 +44,7 @@ func (c *Context) init(t *Text) {
func (t *Text) Render() (string, error) {
t.cleanTemplate()
tmpl, err := template.New("title").Funcs(funcMap()).Parse(t.Template)
tmpl, err := template.New(t.Template).Funcs(funcMap()).Parse(t.Template)
if err != nil {
t.Env.Log(environment.Error, "Render", err.Error())
return "", errors.New(InvalidTemplate)