diff options
author | Bjørn Erik Pedersen <[email protected]> | 2022-05-29 16:41:57 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2022-05-30 11:32:55 +0200 |
commit | 9e904d756be02ca30e4cd9abb1eae8ba01f9c8af (patch) | |
tree | 8771585a9031e37f8ee16044b507af5eb7506083 /hugolib/shortcode_test.go | |
parent | d2cfaede5be420c7d8b701d97b98bc61b87e46d5 (diff) | |
download | hugo-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.go | 8 |
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) |