Skip to content

Commit 801035b

Browse files
jmooringbep
authored andcommitted
tpl/tplimpl: Create an embedded comment shortcode
Closes #13010
1 parent b7861e5 commit 801035b

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{- $noop := .Inner -}}

tpl/tplimpl/tplimpl_integration_test.go

+16
Original file line numberDiff line numberDiff line change
@@ -584,3 +584,19 @@ title: p5
584584
`<meta name="twitter:description" content="m n and **o** can&#39;t.">`,
585585
)
586586
}
587+
588+
func TestCommentShortcode(t *testing.T) {
589+
t.Parallel()
590+
591+
files := `
592+
-- hugo.toml --
593+
disableKinds = ['page','rss','section','sitemap','taxonomy','term']
594+
-- layouts/index.html --
595+
{{ .Content }}
596+
-- content/_index.md --
597+
a{{< comment >}}b{{< /comment >}}c
598+
`
599+
600+
b := hugolib.Test(t, files)
601+
b.AssertFileContent("public/index.html", "<p>ac</p>")
602+
}

0 commit comments

Comments
 (0)