-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Open
Labels
Description
This is a nit. I introduced the problem in #13122.
With this Markdown:
> foo
Without a code block render hook we should render this (match Goldmark/CommonMark):
<blockquote>
<p>foo</p>
</blockquote>
But we're rendering this instead:
<blockquote>
<p>foo</p></blockquote>
Found during creation of integration test for #14044.
integration test
// Issue14046
func TestBlockquoteDefaultOutput(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
disableKinds = ['home','rss','section','sitemap','taxonomy','term']
-- content/p1.md --
---
title: p1
---
> foo
-- layouts/page.html --
|{{ .Content }}|
-- xxx --
<blockquote>
{{ .Text }}
</blockquote>
`
want := "|<blockquote>\n<p>foo</p>\n</blockquote>\n|"
b := hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", want) // fail
files = strings.ReplaceAll(files, "xxx", "layouts/_markup/render-blockquote.html")
b = hugolib.Test(t, files)
b.AssertFileContent("public/p1/index.html", want)
}