From f096635622f117f7552e98d9ab3625369015e6ed Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 20 Dec 2023 22:51:25 +0800 Subject: [PATCH] Fix the issue ref rendering for wiki (#28556) (#28559) Backport #28556 by wxiaoguang Fix #28526, regression of * #26365 Co-authored-by: wxiaoguang --- modules/markup/html.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 (