mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-27 04:07:08 +00:00
Add markup package to prepare for org markup format (#1493)
This commit is contained in:
parent
f0db3da713
commit
52627032bc
6 changed files with 157 additions and 51 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue