summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/misc/markdown.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-02-20 17:10:05 -0500
committerUnknwon <u@gogs.io>2016-02-20 17:10:05 -0500
commitd5a3021a7d86a6dbf42df97c5c25e22b0b3f9505 (patch)
tree2a2c54eb587a4875b742f932398af99d140297ea /routers/api/v1/misc/markdown.go
parentd8a994ef243349f321568f9e36d5c3f444b99cae (diff)
downloadgitea-d5a3021a7d86a6dbf42df97c5c25e22b0b3f9505.tar.gz
gitea-d5a3021a7d86a6dbf42df97c5c25e22b0b3f9505.zip
Make markdown as an independent module
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 e4c4202694..b98a362c3d 100644
--- a/routers/api/v1/misc/markdown.go
+++ b/routers/api/v1/misc/markdown.go
@@ -7,7 +7,7 @@ package misc
import (
api "github.com/gogits/go-gogs-client"
- "github.com/gogits/gogs/modules/base"
+ "github.com/gogits/gogs/modules/markdown"
"github.com/gogits/gogs/modules/middleware"
)
@@ -25,9 +25,9 @@ func Markdown(ctx *middleware.Context, form api.MarkdownOption) {
switch form.Mode {
case "gfm":
- ctx.Write(base.RenderMarkdown([]byte(form.Text), form.Context, nil))
+ ctx.Write(markdown.Render([]byte(form.Text), form.Context, nil))
default:
- ctx.Write(base.RenderRawMarkdown([]byte(form.Text), ""))
+ ctx.Write(markdown.RenderRaw([]byte(form.Text), ""))
}
}
@@ -38,5 +38,5 @@ func MarkdownRaw(ctx *middleware.Context) {
ctx.APIError(422, "", err)
return
}
- ctx.Write(base.RenderRawMarkdown(body, ""))
+ ctx.Write(markdown.RenderRaw(body, ""))
}