Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e3e1e03

Browse files
wxiaoguangsilverwind
authored andcommittedFeb 20, 2024
Fix the issue ref rendering for wiki (go-gitea#28556)
Fix go-gitea#28526, regression of * go-gitea#26365 (although the author of go-gitea#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 d524b27 commit e3e1e03

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)
Please sign in to comment.