mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
tpl/tplimpl: Fix escaped HTML Go 1.9 multioutput issue (#3880)
Fixes #3876
This commit is contained in:
committed by
GitHub
parent
642ba6cab2
commit
2d613dd905
@@ -305,7 +305,8 @@ func (t *htmlTemplates) addTemplateIn(tt *template.Template, name, tpl string) e
|
||||
// We need to keep track of one ot the output format's shortcode template
|
||||
// without knowing the rendering context.
|
||||
withoutExt := strings.TrimSuffix(name, path.Ext(name))
|
||||
tt.AddParseTree(withoutExt, templ.Tree)
|
||||
clone := template.Must(templ.Clone())
|
||||
tt.AddParseTree(withoutExt, clone.Tree)
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -334,7 +335,8 @@ func (t *textTemplates) addTemplateIn(tt *texttemplate.Template, name, tpl strin
|
||||
// We need to keep track of one ot the output format's shortcode template
|
||||
// without knowing the rendering context.
|
||||
withoutExt := strings.TrimSuffix(name, path.Ext(name))
|
||||
tt.AddParseTree(withoutExt, templ.Tree)
|
||||
clone := texttemplate.Must(templ.Clone())
|
||||
tt.AddParseTree(withoutExt, clone.Tree)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user