Skip to content

Commit

Permalink
Pass RenderingContext by reference in Mmark
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed May 25, 2015
1 parent befb54d commit be79c35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helpers/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit be79c35

Please sign in to comment.