1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Fix rendered wiki page link (#31398)

Fix #31395
This commit is contained in:
wxiaoguang
2024-06-18 11:09:20 +08:00
committed by GitHub
parent 37a4b233a0
commit 21783a5752
10 changed files with 58 additions and 73 deletions

View File

@@ -532,7 +532,7 @@ func Wiki(ctx *context.Context) {
}
wikiPath := entry.Name()
if markup.Type(wikiPath) != markdown.MarkupName {
if markup.DetectMarkupTypeByFileName(wikiPath) != markdown.MarkupName {
ext := strings.ToUpper(filepath.Ext(wikiPath))
ctx.Data["FormatWarning"] = fmt.Sprintf("%s rendering is not supported at the moment. Rendered as Markdown.", ext)
}