mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-10 19:54:08 +02:00
committed by
Bjørn Erik Pedersen
parent
b7861e586e
commit
801035bb7a
1
tpl/tplimpl/embedded/templates/shortcodes/comment.html
Normal file
1
tpl/tplimpl/embedded/templates/shortcodes/comment.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{- $noop := .Inner -}}
|
@@ -584,3 +584,19 @@ title: p5
|
|||||||
`<meta name="twitter:description" content="m n and **o** can't.">`,
|
`<meta name="twitter:description" content="m n and **o** can't.">`,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestCommentShortcode(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
|
files := `
|
||||||
|
-- hugo.toml --
|
||||||
|
disableKinds = ['page','rss','section','sitemap','taxonomy','term']
|
||||||
|
-- layouts/index.html --
|
||||||
|
{{ .Content }}
|
||||||
|
-- content/_index.md --
|
||||||
|
a{{< comment >}}b{{< /comment >}}c
|
||||||
|
`
|
||||||
|
|
||||||
|
b := hugolib.Test(t, files)
|
||||||
|
b.AssertFileContent("public/index.html", "<p>ac</p>")
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user