deps: Fix Goldmark regression with HTML comments

Fixes #9650
This commit is contained in:
Bjørn Erik Pedersen 2022-03-11 13:13:18 +01:00
parent 64b7b7a897
commit 1a796d723c
4 changed files with 43 additions and 1 deletions

View file

@ -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>",
)
}