Closed jmooring closed 4 months ago
Reference: https://discourse.gohugo.io/t/50052
This works:
{{ $content := dict "mediaType" "text/markdown" "value" "x{{< sc >}}" }}
This does not (nothing is rendered):
{{ $content := dict "mediaType" "text/markdown" "value" "{{< sc >}}" }}
Test case:
func TestFoo(t *testing.T) { t.Parallel() files := ` -- hugo.toml -- disableKinds = ['home','rss','section','sitemap','taxonomy','term'] -- content/_content.gotmpl -- {{ $content := dict "mediaType" "text/markdown" "value" "x{{< sc >}}" }} {{ .AddPage (dict "content" $content "path" "a") }} {{ $content := dict "mediaType" "text/markdown" "value" "{{< sc >}}" }} {{ .AddPage (dict "content" $content "path" "b") }} -- layouts/_default/single.html -- {{ .Content }}| -- layouts/shortcodes/sc.html -- foo {{- /**/ -}} ` b := hugolib.Test(t, files) b.AssertFileContent("public/a/index.html", "<p>xfoo</p>") b.AssertFileContent("public/b/index.html", "<p>foo</p>") // fails }
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Reference: https://discourse.gohugo.io/t/50052
This works:
This does not (nothing is rendered):
Test case: