shithub: hugo

Download patch

ref: 80d02a14ab97b0b5a4e1117ff467ce3a5ab64102
parent: 4502c4e3aeb459a2df101eebdd76ad4318f812b0
author: digitalcraftsman <[email protected]>
date: Sat Apr 2 21:29:13 EDT 2016

tpl: Add hasPrefix to the template funcs' "smoke test"

--- a/tpl/template_funcs_test.go
+++ b/tpl/template_funcs_test.go
@@ -89,6 +89,7 @@
 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 @@
 substr: Bat
 substr: Man
 title: Bat Man
+hasPrefix: true
 trim: Batman
 upper: BATMAN
 absURL: http://mysite.com/hugo/mystyle.css