mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 00:38:36 +00:00
Add markup package to prepare for org markup format (#1493)
This commit is contained in:
committed by
Kim "BKC" Carlbäcker
parent
f0db3da713
commit
52627032bc
@@ -19,6 +19,7 @@ import (
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/markdown"
|
||||
"code.gitea.io/gitea/modules/markup"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -322,7 +323,7 @@ func Wiki(ctx *context.Context) {
|
||||
}
|
||||
|
||||
ename := entry.Name()
|
||||
if !markdown.IsMarkdownFile(ename) {
|
||||
if markup.Type(ename) != markdown.MarkupName {
|
||||
ext := strings.ToUpper(filepath.Ext(ename))
|
||||
ctx.Data["FormatWarning"] = fmt.Sprintf("%s rendering is not supported at the moment. Rendered as Markdown.", ext)
|
||||
}
|
||||
|
Reference in New Issue
Block a user