aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-11-22 13:48:09 +0800
committerGitHub <noreply@github.com>2024-11-22 05:48:09 +0000
commitc4e27cb27b99dd9528c999fdc8b1073f28be6313 (patch)
treebbd065423fa48e09553918d23bdc7c5daef6e8bd /routers/api/v1
parent81ac8d914cf5fdfaad3c206223ad0ace1e8c1dcd (diff)
downloadgitea-c4e27cb27b99dd9528c999fdc8b1073f28be6313.tar.gz
gitea-c4e27cb27b99dd9528c999fdc8b1073f28be6313.zip
Refactor markup render system (#32589)
This PR mainly moves some code and introduces `RenderContext.WithXxx` functions
Diffstat (limited to 'routers/api/v1')
-rw-r--r--routers/api/v1/misc/markup.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/routers/api/v1/misc/markup.go b/routers/api/v1/misc/markup.go
index 868ed92519..7b3633552f 100644
--- a/routers/api/v1/misc/markup.go
+++ b/routers/api/v1/misc/markup.go
@@ -99,9 +99,7 @@ func MarkdownRaw(ctx *context.APIContext) {
// "422":
// "$ref": "#/responses/validationError"
defer ctx.Req.Body.Close()
- if err := markdown.RenderRaw(&markup.RenderContext{
- Ctx: ctx,
- }, ctx.Req.Body, ctx.Resp); err != nil {
+ if err := markdown.RenderRaw(markup.NewRenderContext(ctx), ctx.Req.Body, ctx.Resp); err != nil {
ctx.InternalServerError(err)
return
}