From: Bjørn Erik Pedersen Date: Fri, 22 Jul 2016 09:00:52 +0000 (+0200) Subject: Simplify the configuration of HugoHTMLRenderer X-Git-Tag: v0.17~222 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=91b61b97;p=brevno-suite%2Fhugo Simplify the configuration of HugoHTMLRenderer --- diff --git a/helpers/content.go b/helpers/content.go index d1b3d787..e955b000 100644 --- a/helpers/content.go +++ b/helpers/content.go @@ -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), } } diff --git a/helpers/content_renderer.go b/helpers/content_renderer.go index 1613d761..60ed46e7 100644 --- a/helpers/content_renderer.go +++ b/helpers/content_renderer.go @@ -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 }