Repository: gohugoio/hugo (language: go)

Issue:
Embedded "comment" shortcode
Although I dislike embedding opinionated shortcodes, given the changes in v0.137.0 (raw HTML warnings) a comment shortcode might make sense:

```text
{{- $noop := .Inner -}}
```

Obviously this is not opinionated.

I'm in the process of writing a tips and trick article for the forum, and part of that document explains what to do instead of using HTML comments in Markdown. So instead of each site and theme author having to reinvent the wheel, perhaps we should embed one.


Discussion / hints:
>we should embed one.

We should.

Fix patch:
diff --git a/tpl/tplimpl/embedded/templates/shortcodes/comment.html b/tpl/tplimpl/embedded/templates/shortcodes/comment.html
new file mode 100644
index 00000000000..cb32934018c
--- /dev/null
+++ b/tpl/tplimpl/embedded/templates/shortcodes/comment.html
@@ -0,0 +1,1 @@
+{{- $noop := .Inner -}}


Test patch:
diff --git a/tpl/tplimpl/tplimpl_integration_test.go b/tpl/tplimpl/tplimpl_integration_test.go
index a8599bbade6..c7e118e8259 100644
--- a/tpl/tplimpl/tplimpl_integration_test.go
+++ b/tpl/tplimpl/tplimpl_integration_test.go
@@ -584,3 +584,19 @@ title: p5
 		`<meta name="twitter:description" content="m n and **o** can&#39;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>")
+}