mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
parent
64b7b7a897
commit
1a796d723c
4 changed files with 43 additions and 1 deletions
|
@ -535,3 +535,33 @@ Link https procol: https://www.example.org
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
// Issue 9650
|
||||
func TestRenderingOfHtmlComments(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
files := `
|
||||
-- config.toml --
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
-- content/p1.md --
|
||||
---
|
||||
title: "p1"
|
||||
---
|
||||
a <!-- b --> c
|
||||
|
||||
-- layouts/_default/single.html --
|
||||
{{ .Content }}
|
||||
`
|
||||
|
||||
b := hugolib.NewIntegrationTestBuilder(
|
||||
hugolib.IntegrationTestConfig{
|
||||
T: t,
|
||||
TxtarString: files,
|
||||
},
|
||||
).Build()
|
||||
|
||||
b.AssertFileContentExact("public/p1/index.html",
|
||||
"<p>a <!-- b --> c</p>",
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue