Skip to content

Commit e4a24d6

Browse files
authored
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)
1 parent 5774216 commit e4a24d6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/markup/html.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,9 @@ func fullIssuePatternProcessor(ctx *RenderContext, node *html.Node) {
852852
}
853853

854854
func issueIndexPatternProcessor(ctx *RenderContext, node *html.Node) {
855-
if ctx.Metas == nil || ctx.Metas["mode"] == "document" {
855+
// FIXME: the use of "mode" is quite dirty and hacky, for example: what is a "document"? how should it be rendered?
856+
// The "mode" approach should be refactored to some other more clear&reliable way.
857+
if ctx.Metas == nil || (ctx.Metas["mode"] == "document" && !ctx.IsWiki) {
856858
return
857859
}
858860
var (

0 commit comments

Comments
 (0)