aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/wiki.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-04-21 15:01:08 +0800
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-04-21 09:01:08 +0200
commit52627032bc55bd73694bea9e6e17df575b51664c (patch)
tree2324046a3936f5b5e68bf07ed7adaf083411b329 /routers/repo/wiki.go
parentf0db3da713eb9440923ddf376349e72b65f129ef (diff)
downloadgitea-52627032bc55bd73694bea9e6e17df575b51664c.tar.gz
gitea-52627032bc55bd73694bea9e6e17df575b51664c.zip
Add markup package to prepare for org markup format (#1493)
Diffstat (limited to 'routers/repo/wiki.go')
-rw-r--r--routers/repo/wiki.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/repo/wiki.go b/routers/repo/wiki.go
index c1c05d305a..2dcf37cc86 100644
--- a/routers/repo/wiki.go
+++ b/routers/repo/wiki.go
@@ -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)
}