tpl/tplimpl: Deprecate comment shortcode
This commit is contained in:
parent
f704d75699
commit
77a8e347bc
2 changed files with 3 additions and 1 deletions
|
@ -1 +1,2 @@
|
||||||
|
{{- 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 -}}
|
||||||
{{- $noop := .Inner -}}
|
{{- $noop := .Inner -}}
|
||||||
|
|
|
@ -33,8 +33,9 @@ disableKinds = ['page','rss','section','sitemap','taxonomy','term']
|
||||||
a{{< comment >}}b{{< /comment >}}c
|
a{{< comment >}}b{{< /comment >}}c
|
||||||
`
|
`
|
||||||
|
|
||||||
b := hugolib.Test(t, files)
|
b := hugolib.Test(t, files, hugolib.TestOptWarn())
|
||||||
b.AssertFileContent("public/index.html", "<p>ac</p>")
|
b.AssertFileContent("public/index.html", "<p>ac</p>")
|
||||||
|
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.`)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDetailsShortcode(t *testing.T) {
|
func TestDetailsShortcode(t *testing.T) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue