aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/shortcode_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-05-29 16:41:57 +0200
committerBjørn Erik Pedersen <[email protected]>2022-05-30 11:32:55 +0200
commit9e904d756be02ca30e4cd9abb1eae8ba01f9c8af (patch)
tree8771585a9031e37f8ee16044b507af5eb7506083 /hugolib/shortcode_test.go
parentd2cfaede5be420c7d8b701d97b98bc61b87e46d5 (diff)
downloadhugo-9e904d756be02ca30e4cd9abb1eae8ba01f9c8af.tar.gz
hugo-9e904d756be02ca30e4cd9abb1eae8ba01f9c8af.zip
Make .RenderString render shortcodes
Fixes #6703
Diffstat (limited to 'hugolib/shortcode_test.go')
-rw-r--r--hugolib/shortcode_test.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go
index cafe76703..15c27a42e 100644
--- a/hugolib/shortcode_test.go
+++ b/hugolib/shortcode_test.go
@@ -107,15 +107,9 @@ title: "Shortcodes Galore!"
t.Parallel()
c := qt.New(t)
- counter := 0
- placeholderFunc := func() string {
- counter++
- return fmt.Sprintf("HAHA%s-%dHBHB", shortcodePlaceholderPrefix, counter)
- }
-
p, err := pageparser.ParseMain(strings.NewReader(test.input), pageparser.Config{})
c.Assert(err, qt.IsNil)
- handler := newShortcodeHandler(nil, s, placeholderFunc)
+ handler := newShortcodeHandler(nil, s)
iter := p.Iterator()
short, err := handler.extractShortcode(0, 0, iter)