Skip to content

Commit d4c80e6

Browse files
authored
Merge pull request #546 from Googlom/v3-fix-layout-button
fix the order in which template Funcs are applied
2 parents 81fbf73 + 9f39ea1 commit d4c80e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

layout/layout.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ func (lt *Layout) ButtonLocale(locale, k string, args ...interface{}) *tele.Btn
282282
return nil
283283
}
284284

285-
tmpl, err := lt.template(template.New(k), locale).Funcs(lt.funcs).Parse(string(data))
285+
tmpl, err := lt.template(template.New(k).Funcs(lt.funcs), locale).Parse(string(data))
286286
if err != nil {
287287
log.Println("telebot/layout:", err)
288288
return nil

0 commit comments

Comments
 (0)