|
|
@ -196,11 +196,6 @@ func (e Engine) initFunMap(t *template.Template) {
|
|
|
|
funcMap := funcMap()
|
|
|
|
funcMap := funcMap()
|
|
|
|
includedNames := make(map[string]int)
|
|
|
|
includedNames := make(map[string]int)
|
|
|
|
|
|
|
|
|
|
|
|
// Set custom template funcs
|
|
|
|
|
|
|
|
for k, v := range e.CustomTemplateFuncs {
|
|
|
|
|
|
|
|
funcMap[k] = v
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add the template-rendering functions here so we can close over t.
|
|
|
|
// Add the template-rendering functions here so we can close over t.
|
|
|
|
funcMap["include"] = includeFun(t, includedNames)
|
|
|
|
funcMap["include"] = includeFun(t, includedNames)
|
|
|
|
funcMap["tpl"] = tplFun(t, includedNames, e.Strict)
|
|
|
|
funcMap["tpl"] = tplFun(t, includedNames, e.Strict)
|
|
|
@ -251,6 +246,11 @@ func (e Engine) initFunMap(t *template.Template) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Set custom template funcs
|
|
|
|
|
|
|
|
for k, v := range e.CustomTemplateFuncs {
|
|
|
|
|
|
|
|
funcMap[k] = v
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
t.Funcs(funcMap)
|
|
|
|
t.Funcs(funcMap)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|