summaryrefslogtreecommitdiffstats
path: root/modules/markup/markdown/markdown.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/markup/markdown/markdown.go')
-rw-r--r--modules/markup/markdown/markdown.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/markup/markdown/markdown.go b/modules/markup/markdown/markdown.go
index 320c2f7f82..7ebdfea6c4 100644
--- a/modules/markup/markdown/markdown.go
+++ b/modules/markup/markdown/markdown.go
@@ -34,9 +34,10 @@ var (
)
var (
- urlPrefixKey = parser.NewContextKey()
- isWikiKey = parser.NewContextKey()
- renderMetasKey = parser.NewContextKey()
+ urlPrefixKey = parser.NewContextKey()
+ isWikiKey = parser.NewContextKey()
+ renderMetasKey = parser.NewContextKey()
+ renderContextKey = parser.NewContextKey()
)
type limitWriter struct {
@@ -67,6 +68,7 @@ func newParserContext(ctx *markup.RenderContext) parser.Context {
pc.Set(urlPrefixKey, ctx.URLPrefix)
pc.Set(isWikiKey, ctx.IsWiki)
pc.Set(renderMetasKey, ctx.Metas)
+ pc.Set(renderContextKey, ctx)
return pc
}