From: digitalcraftsman Date: Sat, 2 Apr 2016 23:29:13 +0000 (+0200) Subject: tpl: Add hasPrefix to the template funcs' "smoke test" X-Git-Tag: v0.16~133 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=80d02a14ab97b0b5a4e1117ff467ce3a5ab64102;p=brevno-suite%2Fhugo tpl: Add hasPrefix to the template funcs' "smoke test" --- diff --git a/tpl/template_funcs_test.go b/tpl/template_funcs_test.go index eb5464c0..2c88e50e 100644 --- a/tpl/template_funcs_test.go +++ b/tpl/template_funcs_test.go @@ -89,6 +89,7 @@ slicestr: {{slicestr "BatMan" 0 3}} substr: {{substr "BatMan" 0 -3}} substr: {{substr "BatMan" 3 3}} title: {{title "Bat man"}} +hasPrefix: {{ hasPrefix "Hugo" "Hu" }} trim: {{ trim "++Batman--" "+-" }} upper: {{upper "BatMan"}} absURL: {{ "mystyle.css" | absURL }} @@ -135,6 +136,7 @@ slicestr: Bat substr: Bat substr: Man title: Bat Man +hasPrefix: true trim: Batman upper: BATMAN absURL: http://mysite.com/hugo/mystyle.css