mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-22 20:22:18 +00:00
parent
b7861e586e
commit
801035bb7a
2 changed files with 17 additions and 0 deletions
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.">`,
|
||||
)
|
||||
}
|
||||
|
||||
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>")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue