Skip to content

Commit

Permalink
Merge pull request tucnak#546 from Googlom/v3-fix-layout-button
Browse files Browse the repository at this point in the history
fix the order in which template Funcs are applied
  • Loading branch information
demget authored Oct 3, 2022
2 parents 81fbf73 + 9f39ea1 commit d4c80e6
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 d4c80e6

Please sign in to comment.