mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 22:21:07 +03:00
parent
d2cfaede5b
commit
9e904d756b
10 changed files with 315 additions and 111 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue