mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
04ccde3e94
commit
b37183e48d
3 changed files with 15 additions and 3 deletions
2
go.mod
2
go.mod
|
@ -58,7 +58,7 @@ require (
|
||||||
github.com/spf13/jwalterweatherman v1.1.0
|
github.com/spf13/jwalterweatherman v1.1.0
|
||||||
github.com/spf13/pflag v1.0.5
|
github.com/spf13/pflag v1.0.5
|
||||||
github.com/tdewolff/minify/v2 v2.10.0
|
github.com/tdewolff/minify/v2 v2.10.0
|
||||||
github.com/yuin/goldmark v1.4.9
|
github.com/yuin/goldmark v1.4.10
|
||||||
go.uber.org/atomic v1.9.0
|
go.uber.org/atomic v1.9.0
|
||||||
gocloud.dev v0.20.0
|
gocloud.dev v0.20.0
|
||||||
golang.org/x/image v0.0.0-20211028202545-6944b10bf410
|
golang.org/x/image v0.0.0-20211028202545-6944b10bf410
|
||||||
|
|
2
go.sum
2
go.sum
|
@ -583,6 +583,8 @@ github.com/yuin/goldmark v1.4.8 h1:zHPiabbIRssZOI0MAzJDHsyvG4MXCGqVaMOwR+HeoQQ=
|
||||||
github.com/yuin/goldmark v1.4.8/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg=
|
github.com/yuin/goldmark v1.4.8/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg=
|
||||||
github.com/yuin/goldmark v1.4.9 h1:RmdXMGe/HwhQEWIjFAu8fjjvkxJ0tDRVbWGrsPNrclw=
|
github.com/yuin/goldmark v1.4.9 h1:RmdXMGe/HwhQEWIjFAu8fjjvkxJ0tDRVbWGrsPNrclw=
|
||||||
github.com/yuin/goldmark v1.4.9/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg=
|
github.com/yuin/goldmark v1.4.9/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg=
|
||||||
|
github.com/yuin/goldmark v1.4.10 h1:+WgKGo8CQrlMTRJpGCFCyNddOhW801TKC2QijVV9QVg=
|
||||||
|
github.com/yuin/goldmark v1.4.10/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg=
|
||||||
go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
|
go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
|
||||||
go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
|
go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
|
||||||
go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs=
|
go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs=
|
||||||
|
|
|
@ -536,8 +536,7 @@ Link https procol: https://www.example.org
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Issue 9650
|
func TestGoldmarkBugs(t *testing.T) {
|
||||||
func TestRenderingOfHtmlComments(t *testing.T) {
|
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
files := `
|
files := `
|
||||||
|
@ -548,8 +547,16 @@ unsafe = true
|
||||||
---
|
---
|
||||||
title: "p1"
|
title: "p1"
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Issue 9650
|
||||||
|
|
||||||
a <!-- b --> c
|
a <!-- b --> c
|
||||||
|
|
||||||
|
## Issue 9658
|
||||||
|
|
||||||
|
- This is a list item <!-- Comment: an innocent-looking comment -->
|
||||||
|
|
||||||
|
|
||||||
-- layouts/_default/single.html --
|
-- layouts/_default/single.html --
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
`
|
`
|
||||||
|
@ -562,6 +569,9 @@ a <!-- b --> c
|
||||||
).Build()
|
).Build()
|
||||||
|
|
||||||
b.AssertFileContentExact("public/p1/index.html",
|
b.AssertFileContentExact("public/p1/index.html",
|
||||||
|
// Issue 9650
|
||||||
"<p>a <!-- b --> c</p>",
|
"<p>a <!-- b --> c</p>",
|
||||||
|
// Issue 9658 (crash)
|
||||||
|
"<li>This is a list item <!-- Comment: an innocent-looking comment --></li>",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue