Skip to content

Commit

Permalink
fix the order in which template Funcs are applied
Browse files Browse the repository at this point in the history
  • Loading branch information
Googlom committed Aug 22, 2022
1 parent c6bead1 commit 9f39ea1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layout/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func (lt *Layout) ButtonLocale(locale, k string, args ...interface{}) *tele.Btn
return nil
}

tmpl, err := lt.template(template.New(k), locale).Funcs(lt.funcs).Parse(string(data))
tmpl, err := lt.template(template.New(k).Funcs(lt.funcs), locale).Parse(string(data))
if err != nil {
log.Println("telebot/layout:", err)
return nil
Expand Down

0 comments on commit 9f39ea1

Please sign in to comment.