Skip to content

Commit

Permalink
Fix the issue ref rendering for wiki (go-gitea#28556)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
wxiaoguang authored and GiteaBot committed Dec 20, 2023
1 parent 932e282 commit 7714c33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/markup/html.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 7714c33

Please sign in to comment.