diff options
author | bep <[email protected]> | 2015-05-25 12:57:37 +0200 |
---|---|---|
committer | bep <[email protected]> | 2015-05-25 12:57:58 +0200 |
commit | be79c35bda0154e36d3bc60e8f7bb00d17952e05 (patch) | |
tree | 59aafc1982e87e7d7274cfbd0449a688ea03acc2 | |
parent | befb54da46659e6678fcd2504cbe5c5fbb9e62b8 (diff) | |
download | hugo-be79c35bda0154e36d3bc60e8f7bb00d17952e05.tar.gz hugo-be79c35bda0154e36d3bc60e8f7bb00d17952e05.zip |
Pass RenderingContext by reference in Mmark
-rw-r--r-- | helpers/content.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/helpers/content.go b/helpers/content.go index 0bb50f440..3a5f423de 100644 --- a/helpers/content.go +++ b/helpers/content.go @@ -208,7 +208,7 @@ func GetMmarkHtmlRenderer(defaultFlags int, ctx *RenderingContext) mmark.Rendere return mmark.HtmlRendererWithParameters(htmlFlags, "", "", renderParameters) } -func GetMmarkExtensions(ctx RenderingContext) int { +func GetMmarkExtensions(ctx *RenderingContext) int { flags := 0 flags |= mmark.EXTENSION_TABLES flags |= mmark.EXTENSION_FENCED_CODE @@ -234,13 +234,13 @@ func GetMmarkExtensions(ctx RenderingContext) int { func MmarkRender(ctx *RenderingContext) []byte { return mmark.Parse(ctx.Content, GetMmarkHtmlRenderer(0, ctx), - GetMmarkExtensions(*ctx)).Bytes() + GetMmarkExtensions(ctx)).Bytes() } func MmarkRenderWithTOC(ctx *RenderingContext) []byte { return mmark.Parse(ctx.Content, GetMmarkHtmlRenderer(0, ctx), - GetMmarkExtensions(*ctx)).Bytes() + GetMmarkExtensions(ctx)).Bytes() } // ExtractTOC extracts Table of Contents from content. |