hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit a89fb86cdf453c4bf8e9d0c1ff2f025006c0ab34
parent f404603340067533ef27d2c3bd1806335812001a
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Tue,  7 Feb 2017 10:43:30 +0700

tpl: Must do a extra lookup of cloned base templates

See #2549
Fixes #3013

Diffstat:
Mtpl/template.go | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/tpl/template.go b/tpl/template.go
@@ -109,6 +109,10 @@ func (*TemplateProvider) Clone(d *deps.Deps) error {
 
 	for k, v := range t.overlays {
 		vc := template.Must(v.Clone())
+		// The extra lookup is a workaround, see
+		// * https://github.com/golang/go/issues/16101
+		// * https://github.com/spf13/hugo/issues/2549
+		vc = vc.Lookup(vc.Name())
 		vc.Funcs(tmpl.funcster.funcMap)
 		tmpl.overlays[k] = vc
 	}