diff options
author | Bjørn Erik Pedersen <[email protected]> | 2022-03-11 13:13:18 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2022-03-11 14:44:01 +0100 |
commit | 1a796d723c90e2747ea83440ad85ff0319770f2c (patch) | |
tree | b983bb2faea7a282e163fdd8d5f1fe8be935a4a5 /markup | |
parent | 64b7b7a89753a39661219b2fcb92d7f185a03f63 (diff) | |
download | hugo-1a796d723c90e2747ea83440ad85ff0319770f2c.tar.gz hugo-1a796d723c90e2747ea83440ad85ff0319770f2c.zip |
deps: Fix Goldmark regression with HTML comments
Fixes #9650
Diffstat (limited to 'markup')
-rw-r--r-- | markup/goldmark/integration_test.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/markup/goldmark/integration_test.go b/markup/goldmark/integration_test.go index cab85cfdd..064ffb85d 100644 --- a/markup/goldmark/integration_test.go +++ b/markup/goldmark/integration_test.go @@ -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>", + ) +} |