Merge pull request #546 from Googlom/v3-fix-layout-button

fix the order in which template Funcs are applied
pull/558/head
demget 2 years ago committed by GitHub
commit d4c80e6239
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save