summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-07-12 23:13:59 +0200
committerGitHub <noreply@github.com>2021-07-12 17:13:59 -0400
commit46a4c6835daf4642074bb1a18a3210b03a64259b (patch)
treea9a069d550e2c32904d691f3f89589aac814b1f6 /routers
parentfb04cc7dbd619589e45180e1a017c8039ecd9342 (diff)
downloadgitea-46a4c6835daf4642074bb1a18a3210b03a64259b.tar.gz
gitea-46a4c6835daf4642074bb1a18a3210b03a64259b.zip
Fix external renderer (#16401)
* fix external renderer * use GBackground context as fallback * no fallback, return error Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'routers')
-rw-r--r--routers/web/repo/view.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go
index cf076bdf1a..21bd80c406 100644
--- a/routers/web/repo/view.go
+++ b/routers/web/repo/view.go
@@ -336,6 +336,7 @@ func renderDirectory(ctx *context.Context, treeLink string) {
ctx.Data["MarkupType"] = string(markupType)
var result strings.Builder
err := markup.Render(&markup.RenderContext{
+ Ctx: ctx,
Filename: readmeFile.name,
URLPrefix: readmeTreelink,
Metas: ctx.Repo.Repository.ComposeDocumentMetas(),
@@ -511,6 +512,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
ctx.Data["MarkupType"] = markupType
var result strings.Builder
err := markup.Render(&markup.RenderContext{
+ Ctx: ctx,
Filename: blob.Name(),
URLPrefix: path.Dir(treeLink),
Metas: ctx.Repo.Repository.ComposeDocumentMetas(),
@@ -570,6 +572,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
ctx.Data["MarkupType"] = markupType
var result strings.Builder
err := markup.Render(&markup.RenderContext{
+ Ctx: ctx,
Filename: blob.Name(),
URLPrefix: path.Dir(treeLink),
Metas: ctx.Repo.Repository.ComposeDocumentMetas(),