Skip to content

Commit 77a8e34

Browse files
jmooringbep
authored andcommitted
tpl/tplimpl: Deprecate comment shortcode
1 parent f704d75 commit 77a8e34

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
{{- warnf "The %q shortcode was deprecated in v0.143.0 and will be removed in a future release. Please use HTML comments instead. See %s" .Name .Position -}}
12
{{- $noop := .Inner -}}

‎tpl/tplimpl/shortcodes_integration_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ disableKinds = ['page','rss','section','sitemap','taxonomy','term']
3333
a{{< comment >}}b{{< /comment >}}c
3434
`
3535

36-
b := hugolib.Test(t, files)
36+
b := hugolib.Test(t, files, hugolib.TestOptWarn())
3737
b.AssertFileContent("public/index.html", "<p>ac</p>")
38+
b.AssertLogContains(`WARN The "comment" shortcode was deprecated in v0.143.0 and will be removed in a future release. Please use HTML comments instead.`)
3839
}
3940

4041
func TestDetailsShortcode(t *testing.T) {

0 commit comments

Comments
 (0)