From 0e2260421e40c97d9d210724fb44cfdc15ea7855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 1 May 2017 09:06:42 +0200 Subject: tpl: Fix the remaining template funcs namespace issues See #3042 --- tpl/compare/init.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tpl/compare') diff --git a/tpl/compare/init.go b/tpl/compare/init.go index d8d30d6f4..bf8227353 100644 --- a/tpl/compare/init.go +++ b/tpl/compare/init.go @@ -25,7 +25,9 @@ func init() { ctx := New() examples := [][2]string{ - {`eq: {{ if eq .Section "blog" }}current{{ end }}`, `eq: current`}, + {`{{ if eq .Section "blog" }}current{{ end }}`, `current`}, + {`{{ "Hugo Rocks!" | default "Hugo Rules!" }}`, `Hugo Rocks!`}, + {`{{ "" | default "Hugo Rules!" }}`, `Hugo Rules!`}, } return &internal.TemplateFuncsNamespace{ -- cgit v1.2.3