ref: 6c900380dc3e7a3b7a7e26ece95c690cf6baea5a
parent: f2ff77f3ac3d2f347cc81f7aabf15d5b55cf2e0c
author: digitalcraftsman <[email protected]>
date: Fri Apr 8 17:36:35 EDT 2016
tpl: Add replaceRE to the "smoke tests" Fixes #2063
--- a/tpl/template_funcs_test.go
+++ b/tpl/template_funcs_test.go
@@ -107,6 +107,7 @@
relURL 1: {{ "http://gohugo.io/" | relURL }}
relURL 2: {{ "mystyle.css" | relURL }}
replace: {{ replace "Batman and Robin" "Robin" "Catwoman" }}
+replaceRE: {{ "http://gohugo.io/docs" | replaceRE "^https?://([^/]+).*" "$1" }}
safeCSS: {{ "Bat&Man" | safeCSS | safeCSS }}
safeHTML: {{ "Bat&Man" | safeHTML | safeHTML }}
safeHTML: {{ "Bat&Man" | safeHTML }}
@@ -157,6 +158,7 @@
relURL 1: http://gohugo.io/
relURL 2: /hugo/mystyle.css
replace: Batman and Catwoman
+replaceRE: gohugo.io
safeCSS: Bat&Man
safeHTML: Bat&Man
safeHTML: Bat&Man