mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
@@ -42,8 +42,8 @@ func TestEmojify(t *testing.T) {
|
||||
ns := transform.New(b.H.Deps)
|
||||
|
||||
for _, test := range []struct {
|
||||
s interface{}
|
||||
expect interface{}
|
||||
s any
|
||||
expect any
|
||||
}{
|
||||
{":notamoji:", template.HTML(":notamoji:")},
|
||||
{"I :heart: Hugo", template.HTML("I ❤️ Hugo")},
|
||||
@@ -72,10 +72,10 @@ func TestHighlight(t *testing.T) {
|
||||
ns := transform.New(b.H.Deps)
|
||||
|
||||
for _, test := range []struct {
|
||||
s interface{}
|
||||
s any
|
||||
lang string
|
||||
opts interface{}
|
||||
expect interface{}
|
||||
opts any
|
||||
expect any
|
||||
}{
|
||||
{"func boo() {}", "go", "", "boo"},
|
||||
{"func boo() {}", "go", nil, "boo"},
|
||||
@@ -117,8 +117,8 @@ func TestHTMLEscape(t *testing.T) {
|
||||
ns := transform.New(b.H.Deps)
|
||||
|
||||
for _, test := range []struct {
|
||||
s interface{}
|
||||
expect interface{}
|
||||
s any
|
||||
expect any
|
||||
}{
|
||||
{`"Foo & Bar's Diner" <y@z>`, `"Foo & Bar's Diner" <y@z>`},
|
||||
{"Hugo & Caddy > Wordpress & Apache", "Hugo & Caddy > Wordpress & Apache"},
|
||||
@@ -147,8 +147,8 @@ func TestHTMLUnescape(t *testing.T) {
|
||||
ns := transform.New(b.H.Deps)
|
||||
|
||||
for _, test := range []struct {
|
||||
s interface{}
|
||||
expect interface{}
|
||||
s any
|
||||
expect any
|
||||
}{
|
||||
{`"Foo & Bar's Diner" <y@z>`, `"Foo & Bar's Diner" <y@z>`},
|
||||
{"Hugo & Caddy > Wordpress & Apache", "Hugo & Caddy > Wordpress & Apache"},
|
||||
@@ -177,8 +177,8 @@ func TestMarkdownify(t *testing.T) {
|
||||
ns := transform.New(b.H.Deps)
|
||||
|
||||
for _, test := range []struct {
|
||||
s interface{}
|
||||
expect interface{}
|
||||
s any
|
||||
expect any
|
||||
}{
|
||||
{"Hello **World!**", template.HTML("Hello <strong>World!</strong>")},
|
||||
{[]byte("Hello Bytes **World!**"), template.HTML("Hello Bytes <strong>World!</strong>")},
|
||||
@@ -233,8 +233,8 @@ func TestPlainify(t *testing.T) {
|
||||
ns := transform.New(b.H.Deps)
|
||||
|
||||
for _, test := range []struct {
|
||||
s interface{}
|
||||
expect interface{}
|
||||
s any
|
||||
expect any
|
||||
}{
|
||||
{"<em>Note:</em> blah <b>blah</b>", "Note: blah blah"},
|
||||
// errors
|
||||
|
Reference in New Issue
Block a user