tpl: Add hasPrefix to the template funcs' "smoke test" - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 80d02a14ab97b0b5a4e1117ff467ce3a5ab64102
DIR parent 4502c4e3aeb459a2df101eebdd76ad4318f812b0
HTML Author: digitalcraftsman <digitalcraftsman@protonmail.com>
Date: Sun, 3 Apr 2016 01:29:13 +0200
tpl: Add hasPrefix to the template funcs' "smoke test"
Diffstat:
M tpl/template_funcs_test.go | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
---
DIR diff --git 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