Simplify the configuration of HugoHTMLRenderer

This commit is contained in:
Bjørn Erik Pedersen 2016-07-22 11:00:52 +02:00
parent 4d4da001a0
commit 91b61b976d
2 changed files with 3 additions and 5 deletions

View file

@ -203,9 +203,8 @@ func getHTMLRenderer(defaultFlags int, ctx *RenderingContext) blackfriday.Render
}
return &HugoHTMLRenderer{
FileResolver: ctx.FileResolver,
LinkResolver: ctx.LinkResolver,
Renderer: blackfriday.HtmlRendererWithParameters(htmlFlags, "", "", renderParameters),
RenderingContext: ctx,
Renderer: blackfriday.HtmlRendererWithParameters(htmlFlags, "", "", renderParameters),
}
}

View file

@ -29,8 +29,7 @@ type FileResolverFunc func(ref string) (string, error)
// HugoHTMLRenderer wraps a blackfriday.Renderer, typically a blackfriday.Html
// Enabling Hugo to customise the rendering experience
type HugoHTMLRenderer struct {
FileResolver FileResolverFunc
LinkResolver LinkResolverFunc
*RenderingContext
blackfriday.Renderer
}