mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
@@ -132,7 +132,7 @@ func (r *htmlRenderer) renderCodeBlock(w util.BufWriter, src []byte, node ast.No
|
||||
}
|
||||
|
||||
type codeBlockContext struct {
|
||||
page interface{}
|
||||
page any
|
||||
lang string
|
||||
code string
|
||||
ordinal int
|
||||
@@ -146,7 +146,7 @@ type codeBlockContext struct {
|
||||
*attributes.AttributesHolder
|
||||
}
|
||||
|
||||
func (c *codeBlockContext) Page() interface{} {
|
||||
func (c *codeBlockContext) Page() any {
|
||||
return c.page
|
||||
}
|
||||
|
||||
|
@@ -44,7 +44,7 @@ func convert(c *qt.C, mconf markup_config.Config, content string) converter.Resu
|
||||
c.Assert(err, qt.IsNil)
|
||||
h := highlight.New(mconf.Highlight)
|
||||
|
||||
getRenderer := func(t hooks.RendererType, id interface{}) interface{} {
|
||||
getRenderer := func(t hooks.RendererType, id any) any {
|
||||
if t == hooks.CodeBlockRendererType {
|
||||
return h
|
||||
}
|
||||
@@ -233,7 +233,7 @@ func TestConvertAttributes(t *testing.T) {
|
||||
name string
|
||||
withConfig func(conf *markup_config.Config)
|
||||
input string
|
||||
expect interface{}
|
||||
expect any
|
||||
}{
|
||||
{
|
||||
"Title",
|
||||
@@ -408,7 +408,7 @@ LINE5
|
||||
|
||||
h := highlight.New(conf)
|
||||
|
||||
getRenderer := func(t hooks.RendererType, id interface{}) interface{} {
|
||||
getRenderer := func(t hooks.RendererType, id any) any {
|
||||
if t == hooks.CodeBlockRendererType {
|
||||
return h
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ func newLinks(cfg goldmark_config.Config) goldmark.Extender {
|
||||
}
|
||||
|
||||
type linkContext struct {
|
||||
page interface{}
|
||||
page any
|
||||
destination string
|
||||
title string
|
||||
text hstring.RenderedString
|
||||
@@ -62,7 +62,7 @@ func (ctx linkContext) Resolved() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (ctx linkContext) Page() interface{} {
|
||||
func (ctx linkContext) Page() any {
|
||||
return ctx.page
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ func (ctx linkContext) Title() string {
|
||||
}
|
||||
|
||||
type headingContext struct {
|
||||
page interface{}
|
||||
page any
|
||||
level int
|
||||
anchor string
|
||||
text hstring.RenderedString
|
||||
@@ -87,7 +87,7 @@ type headingContext struct {
|
||||
*attributes.AttributesHolder
|
||||
}
|
||||
|
||||
func (ctx headingContext) Page() interface{} {
|
||||
func (ctx headingContext) Page() any {
|
||||
return ctx.page
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ type hookedRenderer struct {
|
||||
html.Config
|
||||
}
|
||||
|
||||
func (r *hookedRenderer) SetOption(name renderer.OptionName, value interface{}) {
|
||||
func (r *hookedRenderer) SetOption(name renderer.OptionName, value any) {
|
||||
r.Config.SetOption(name, value)
|
||||
}
|
||||
|
||||
|
@@ -28,7 +28,7 @@ import (
|
||||
qt "github.com/frankban/quicktest"
|
||||
)
|
||||
|
||||
var nopGetRenderer = func(t hooks.RendererType, id interface{}) interface{} { return nil }
|
||||
var nopGetRenderer = func(t hooks.RendererType, id any) any { return nil }
|
||||
|
||||
func TestToc(t *testing.T) {
|
||||
c := qt.New(t)
|
||||
|
Reference in New Issue
Block a user