aboutsummaryrefslogtreecommitdiff
path: root/routers/api/v1/misc/markdown.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-03-31 15:29:43 -0400
committerUnknwon <u@gogs.io>2017-03-31 15:29:43 -0400
commitc1c269d9ef50595475cf4c6728d9b20a6417c490 (patch)
tree287621c5244c9b11b6e980190fce9bb887d2bf1f /routers/api/v1/misc/markdown.go
parent9edac05e05387e335466957ecf3400a19c6ae808 (diff)
modules: rename markdown -> markup
To further support more markup languages (e.g. Org-mode, AsciiDoc, reStructuredText), the name 'markdown' is inappropriate. This is the first step towards more markup language support.
Diffstat (limited to 'routers/api/v1/misc/markdown.go')
-rw-r--r--routers/api/v1/misc/markdown.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/api/v1/misc/markdown.go b/routers/api/v1/misc/markdown.go
index 64895db0..58ff93f5 100644
--- a/routers/api/v1/misc/markdown.go
+++ b/routers/api/v1/misc/markdown.go
@@ -8,7 +8,7 @@ import (
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/modules/context"
- "github.com/gogits/gogs/modules/markdown"
+ "github.com/gogits/gogs/modules/markup"
)
// https://github.com/gogits/go-gogs-client/wiki/Miscellaneous#render-an-arbitrary-markdown-document
@@ -25,9 +25,9 @@ func Markdown(ctx *context.APIContext, form api.MarkdownOption) {
switch form.Mode {
case "gfm":
- ctx.Write(markdown.Render([]byte(form.Text), form.Context, nil))
+ ctx.Write(markup.Render([]byte(form.Text), form.Context, nil))
default:
- ctx.Write(markdown.RenderRaw([]byte(form.Text), ""))
+ ctx.Write(markup.RenderRaw([]byte(form.Text), ""))
}
}
@@ -38,5 +38,5 @@ func MarkdownRaw(ctx *context.APIContext) {
ctx.Error(422, "", err)
return
}
- ctx.Write(markdown.RenderRaw(body, ""))
+ ctx.Write(markup.RenderRaw(body, ""))
}