projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f404603
)
tpl: Must do a extra lookup of cloned base templates
author
Bjørn Erik Pedersen
<bjorn.erik.pedersen@gmail.com>
Tue, 7 Feb 2017 03:43:30 +0000
(10:43 +0700)
committer
Bjørn Erik Pedersen
<bjorn.erik.pedersen@gmail.com>
Tue, 7 Feb 2017 03:43:30 +0000
(10:43 +0700)
See #2549
Fixes #3013
tpl/template.go
patch
|
blob
|
history
diff --git
a/tpl/template.go
b/tpl/template.go
index 1c71989f47193b89144186847b91b55f5291c373..9efb8869ac09cff6bec599ae4cc4e89e4352d4b6 100644
(file)
--- 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
}