diff options
author | Unknwon <u@gogs.io> | 2016-02-20 17:10:05 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-02-20 17:10:05 -0500 |
commit | d5a3021a7d86a6dbf42df97c5c25e22b0b3f9505 (patch) | |
tree | 2a2c54eb587a4875b742f932398af99d140297ea /routers/api/v1/misc/markdown.go | |
parent | d8a994ef243349f321568f9e36d5c3f444b99cae (diff) | |
download | gitea-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.go | 8 |
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, "")) } |