aboutsummaryrefslogtreecommitdiffstats
path: root/routers/common
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-11-26 03:04:55 +0800
committerGitHub <noreply@github.com>2024-11-26 03:04:55 +0800
commit44909f6e2c8f94b3153cb5114078e4eebe65a4a8 (patch)
tree48e5fa0a44632ff90ba77acf93c1dfb3d65a366b /routers/common
parent5d57c287fb5ce2f5da82d75ed7837758701d5b1e (diff)
downloadgitea-44909f6e2c8f94b3153cb5114078e4eebe65a4a8.tar.gz
gitea-44909f6e2c8f94b3153cb5114078e4eebe65a4a8.zip
Fix markup render regression and fix some tests (#32640)
Fix #32639, https://github.com/go-gitea/gitea/issues/32608#issuecomment-2497918210 By the way, fix some incorrect SQLs (use single quote but not double quote)
Diffstat (limited to 'routers/common')
-rw-r--r--routers/common/markup.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/common/markup.go b/routers/common/markup.go
index e3e6d9cfcf..533b546a2a 100644
--- a/routers/common/markup.go
+++ b/routers/common/markup.go
@@ -77,8 +77,10 @@ func RenderMarkup(ctx *context.Base, ctxRepo *context.Repository, mode, text, ur
rctx = rctx.WithMarkupType(markdown.MarkupName)
case "comment":
rctx = renderhelper.NewRenderContextRepoComment(ctx, repoModel, renderhelper.RepoCommentOptions{DeprecatedOwnerName: repoOwnerName, DeprecatedRepoName: repoName})
+ rctx = rctx.WithMarkupType(markdown.MarkupName)
case "wiki":
rctx = renderhelper.NewRenderContextRepoWiki(ctx, repoModel, renderhelper.RepoWikiOptions{DeprecatedOwnerName: repoOwnerName, DeprecatedRepoName: repoName})
+ rctx = rctx.WithMarkupType(markdown.MarkupName)
case "file":
rctx = renderhelper.NewRenderContextRepoFile(ctx, repoModel, renderhelper.RepoFileOptions{
DeprecatedOwnerName: repoOwnerName, DeprecatedRepoName: repoName,