Fix rendered wiki page link (#31398) (#31407)

Backport #31398

Fix #31395
This commit is contained in:
wxiaoguang
2024-06-19 11:23:24 +08:00
committed by GitHub
parent e8e43a7ee4
commit 042e9fcd81
11 changed files with 62 additions and 78 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)
}