Allow hyphens in shortcode name

Fixes #929
This commit is contained in:
bep
2015-02-27 11:57:23 +01:00
parent 967d001ebe
commit 176ce5deab
2 changed files with 12 additions and 4 deletions

View File

@@ -33,6 +33,14 @@ func TestNonSC(t *testing.T) {
CheckShortCodeMatch(t, "{{%/* movie 47238zzb */%}}", "{{% movie 47238zzb %}}", tem)
}
// Issue #929
func TestHyphenatedSC(t *testing.T) {
tem := tpl.New()
tem.AddInternalShortcode("hyphenated-video.html", `Playing Video {{ .Get 0 }}`)
CheckShortCodeMatch(t, "{{< hyphenated-video 47238zzb >}}", "Playing Video 47238zzb", tem)
}
func TestPositionalParamSC(t *testing.T) {
tem := tpl.New()
tem.AddInternalShortcode("video.html", `Playing Video {{ .Get 0 }}`)