aboutsummaryrefslogtreecommitdiff
path: root/routers/api/v1/misc/markdown.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-03-31 16:37:30 -0400
committerUnknwon <u@gogs.io>2017-03-31 16:37:30 -0400
commit8da16ac302b78c4c6bad90cd5c8765de110c42af (patch)
treeaa2ed0872bd03e4d7f53586dda0efdd60f3a354a /routers/api/v1/misc/markdown.go
parent761bb3cf53960485921ad045bae5a79340d66f97 (diff)
modules/markup: rename Markdown render fucntions
The unified function 'Markdown' accepts both string or []byte type input and renders to HTML with []byte type.
Diffstat (limited to 'routers/api/v1/misc/markdown.go')
-rw-r--r--routers/api/v1/misc/markdown.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/misc/markdown.go b/routers/api/v1/misc/markdown.go
index 58ff93f5..4c6251b9 100644
--- a/routers/api/v1/misc/markdown.go
+++ b/routers/api/v1/misc/markdown.go
@@ -25,7 +25,7 @@ func Markdown(ctx *context.APIContext, form api.MarkdownOption) {
switch form.Mode {
case "gfm":
- ctx.Write(markup.Render([]byte(form.Text), form.Context, nil))
+ ctx.Write(markup.Markdown([]byte(form.Text), form.Context, nil))
default:
ctx.Write(markup.RenderRaw([]byte(form.Text), ""))
}