summaryrefslogtreecommitdiffhomepage
path: root/tpl
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2021-06-08 18:52:38 +0200
committerBjørn Erik Pedersen <[email protected]>2021-06-08 18:52:38 +0200
commita91cd7652f7559492b070dbe02fe558348f3d0b6 (patch)
treeef126d1c5a0a17ec4ee8d3641d6356c591e79a38 /tpl
parent162f41d0efdd4a5e12e489cf8ecf8490b45884da (diff)
downloadhugo-a91cd7652f7559492b070dbe02fe558348f3d0b6.tar.gz
hugo-a91cd7652f7559492b070dbe02fe558348f3d0b6.zip
docs: Regenerate docs helper
Diffstat (limited to 'tpl')
-rw-r--r--tpl/fmt/fmt.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/tpl/fmt/fmt.go b/tpl/fmt/fmt.go
index 9c16ca656..cb8aa3cf2 100644
--- a/tpl/fmt/fmt.go
+++ b/tpl/fmt/fmt.go
@@ -25,7 +25,11 @@ import (
// New returns a new instance of the fmt-namespaced template functions.
func New(d *deps.Deps) *Namespace {
- ignorableLogger := d.Log.(loggers.IgnorableLogger)
+ ignorableLogger, ok := d.Log.(loggers.IgnorableLogger)
+ if !ok {
+ ignorableLogger = loggers.NewIgnorableLogger(d.Log)
+ }
+
distinctLogger := helpers.NewDistinctLogger(d.Log)
ns := &Namespace{
distinctLogger: ignorableLogger.Apply(distinctLogger),