mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 22:50:35 +03:00
parent
dc4226a8b2
commit
65deb72dc4
9 changed files with 1 additions and 81 deletions
|
@ -160,35 +160,6 @@ title: Shorty
|
|||
}
|
||||
}
|
||||
|
||||
func TestShortcodeSpeakerdeck(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
for _, this := range []struct {
|
||||
in, expected string
|
||||
}{
|
||||
{
|
||||
`{{< speakerdeck 4e8126e72d853c0060001f97 >}}`,
|
||||
"(?s)<script async class='speakerdeck-embed' data-id='4e8126e72d853c0060001f97'.*?>.*?</script>",
|
||||
},
|
||||
} {
|
||||
|
||||
var (
|
||||
cfg, fs = newTestCfg()
|
||||
th = testHelper{cfg, fs, t}
|
||||
)
|
||||
|
||||
writeSource(t, fs, filepath.Join("content", "simple.md"), fmt.Sprintf(`---
|
||||
title: Shorty
|
||||
---
|
||||
%s`, this.in))
|
||||
writeSource(t, fs, filepath.Join("layouts", "_default", "single.html"), `{{ .Content }}`)
|
||||
|
||||
buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{})
|
||||
|
||||
th.assertFileContentRegexp(filepath.Join("public", "simple", "index.html"), this.expected)
|
||||
}
|
||||
}
|
||||
|
||||
func TestShortcodeYoutube(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue