Skip to content

Commit

Permalink
Simplify the configuration of HugoHTMLRenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jul 22, 2016
1 parent 4d4da00 commit 91b61b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions helpers/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
}

Expand Down
3 changes: 1 addition & 2 deletions helpers/content_renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 91b61b9

Please sign in to comment.