Fix language handling in ExecuteAsTemplate

Fixes #6331
This commit is contained in:
Bjørn Erik Pedersen
2019-11-26 09:44:31 +01:00
parent 03b369e672
commit 96f09659ce
5 changed files with 51 additions and 26 deletions

View File

@@ -26,11 +26,9 @@ var DefaultTemplateProvider *TemplateProvider
// Update updates the Hugo Template System in the provided Deps
// with all the additional features, templates & functions.
func (*TemplateProvider) Update(deps *deps.Deps) error {
newTmpl := newTemplateAdapter(deps)
deps.Tmpl = newTmpl
deps.TextTmpl = newTmpl.NewTextTemplate()
deps.TextTmpl = newTmpl.wrapTextTemplate(newTmpl.text.standalone)
newTmpl.initFuncs()
@@ -56,8 +54,6 @@ func (*TemplateProvider) Clone(d *deps.Deps) error {
t := d.Tmpl.(*templateHandler)
clone := t.clone(d)
d.Tmpl = clone
return clone.MarkReady()
}