Fix the issue ref rendering for wiki (#28556) (#28559)

Backport #28556 by wxiaoguang

Fix #28526, regression of
* #26365

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit f096635622f117f7552e98d9ab3625369015e6ed)
This commit is contained in:
Giteabot 2023-12-20 22:51:25 +08:00 committed by Earl Warren
parent 9693f08812
commit 40fa6a526a
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -852,7 +852,9 @@ func fullIssuePatternProcessor(ctx *RenderContext, node *html.Node) {
} }
func issueIndexPatternProcessor(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 return
} }
var ( var (