diff options
author | Bjørn Erik Pedersen <[email protected]> | 2019-11-04 10:57:11 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2019-11-04 10:57:11 +0100 |
commit | 9abd396789d007193145db9246d5daf1640bbb8a (patch) | |
tree | 047eba4c84970a3d569c83923615ddab3f05f7cd /helpers/content.go | |
parent | ad4c56b5512226e74fb4ed6f10630d26d93e9eb6 (diff) | |
download | hugo-9abd396789d007193145db9246d5daf1640bbb8a.tar.gz hugo-9abd396789d007193145db9246d5daf1640bbb8a.zip |
helpers: Use pointer receiver for ContentSpec
Diffstat (limited to 'helpers/content.go')
-rw-r--r-- | helpers/content.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/helpers/content.go b/helpers/content.go index 591403cb0..fe96ce7d2 100644 --- a/helpers/content.go +++ b/helpers/content.go @@ -354,7 +354,7 @@ func getMarkdownExtensions(ctx *RenderingContext) int { return flags } -func (c ContentSpec) markdownRender(ctx *RenderingContext) []byte { +func (c *ContentSpec) markdownRender(ctx *RenderingContext) []byte { if ctx.RenderTOC { return blackfriday.Markdown(ctx.Content, c.getHTMLRenderer(blackfriday.HTML_TOC, ctx), @@ -420,7 +420,7 @@ func getMmarkExtensions(ctx *RenderingContext) int { return flags } -func (c ContentSpec) mmarkRender(ctx *RenderingContext) []byte { +func (c *ContentSpec) mmarkRender(ctx *RenderingContext) []byte { return mmark.Parse(ctx.Content, c.getMmarkHTMLRenderer(0, ctx), getMmarkExtensions(ctx)).Bytes() } @@ -479,7 +479,7 @@ type RenderingContext struct { } // RenderBytes renders a []byte. -func (c ContentSpec) RenderBytes(ctx *RenderingContext) []byte { +func (c *ContentSpec) RenderBytes(ctx *RenderingContext) []byte { switch ctx.PageFmt { default: return c.markdownRender(ctx) @@ -752,7 +752,7 @@ func getPandocContent(ctx *RenderingContext) []byte { return externallyRenderContent(ctx, path, args) } -func orgRender(ctx *RenderingContext, c ContentSpec) []byte { +func orgRender(ctx *RenderingContext, c *ContentSpec) []byte { config := org.New() config.Log = jww.WARN config.ReadFile = func(filename string) ([]byte, error) { |