From c1c269d9ef50595475cf4c6728d9b20a6417c490 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 31 Mar 2017 15:29:43 -0400 Subject: 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. --- routers/api/v1/misc/markdown.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'routers/api/v1/misc/markdown.go') 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, "")) } -- cgit v1.2.3