summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-12-20 22:11:59 +0800
committerGitHub <noreply@github.com>2023-12-20 14:11:59 +0000
commite4a24d6727e70a8a7f4688d738c36db1f0fcbcc4 (patch)
tree06634adfab53310bea1de9ab39771d0fb0eaab19 /modules
parent577421691b5bca38b9116eb36efcfc9b1dfe2043 (diff)
downloadgitea-e4a24d6727e70a8a7f4688d738c36db1f0fcbcc4.tar.gz
gitea-e4a24d6727e70a8a7f4688d738c36db1f0fcbcc4.zip
Fix the issue ref rendering for wiki (#28556)
Fix #28526, regression of * #26365 (although the author of #26365 has recent activities, but there is no response for the regression, so I proposed this quick fix and keep the fix simple to make it easier to backport to 1.21)
Diffstat (limited to 'modules')
-rw-r--r--modules/markup/html.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/markup/html.go b/modules/markup/html.go
index 774cbe1557..03168b6946 100644
--- a/modules/markup/html.go
+++ b/modules/markup/html.go
@@ -852,7 +852,9 @@ func fullIssuePatternProcessor(ctx *RenderContext, node *html.Node) {
}
func issueIndexPatternProcessor(ctx *RenderContext, node *html.Node) {
- if ctx.Metas == nil || ctx.Metas["mode"] == "document" {
+ // FIXME: the use of "mode" is quite dirty and hacky, for example: what is a "document"? how should it be rendered?
+ // The "mode" approach should be refactored to some other more clear&reliable way.
+ if ctx.Metas == nil || (ctx.Metas["mode"] == "document" && !ctx.IsWiki) {
return
}
var (