mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-25 01:12:39 +00:00
Simplify the configuration of HugoHTMLRenderer
This commit is contained in:
parent
4d4da001a0
commit
91b61b976d
2 changed files with 3 additions and 5 deletions
|
@ -203,9 +203,8 @@ func getHTMLRenderer(defaultFlags int, ctx *RenderingContext) blackfriday.Render
|
||||||
}
|
}
|
||||||
|
|
||||||
return &HugoHTMLRenderer{
|
return &HugoHTMLRenderer{
|
||||||
FileResolver: ctx.FileResolver,
|
RenderingContext: ctx,
|
||||||
LinkResolver: ctx.LinkResolver,
|
Renderer: blackfriday.HtmlRendererWithParameters(htmlFlags, "", "", renderParameters),
|
||||||
Renderer: blackfriday.HtmlRendererWithParameters(htmlFlags, "", "", renderParameters),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,7 @@ type FileResolverFunc func(ref string) (string, error)
|
||||||
// HugoHTMLRenderer wraps a blackfriday.Renderer, typically a blackfriday.Html
|
// HugoHTMLRenderer wraps a blackfriday.Renderer, typically a blackfriday.Html
|
||||||
// Enabling Hugo to customise the rendering experience
|
// Enabling Hugo to customise the rendering experience
|
||||||
type HugoHTMLRenderer struct {
|
type HugoHTMLRenderer struct {
|
||||||
FileResolver FileResolverFunc
|
*RenderingContext
|
||||||
LinkResolver LinkResolverFunc
|
|
||||||
blackfriday.Renderer
|
blackfriday.Renderer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue