diff options
author | digitalcraftsman <digitalcraftsman@protonmail.com> | 2016-04-08 22:36:35 +0300 |
---|---|---|
committer | digitalcraftsman <digitalcraftsman@protonmail.com> | 2016-04-08 22:36:35 +0300 |
commit | 6c900380dc3e7a3b7a7e26ece95c690cf6baea5a (patch) | |
tree | 130db8e7ad11eeb78f68fcacd9e05d8f2d906ab9 /tpl | |
parent | f2ff77f3ac3d2f347cc81f7aabf15d5b55cf2e0c (diff) |
tpl: Add replaceRE to the "smoke tests"
Fixes #2063
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/template_funcs_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tpl/template_funcs_test.go b/tpl/template_funcs_test.go index 7e83542fb..8d604e817 100644 --- a/tpl/template_funcs_test.go +++ b/tpl/template_funcs_test.go @@ -107,6 +107,7 @@ readFile: {{ readFile "README.txt" }} 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 @@ readFile: Hugo Rocks! 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 |