summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/misc/markdown.go
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2018-02-20 04:50:42 -0800
committerBo-Yi Wu <appleboy.tw@gmail.com>2018-02-20 20:50:42 +0800
commit7b104f0cd03cf3df2b10f6f447857fe389654df1 (patch)
treecb8517fa34a6a7e18bc275f97f6541aa0783ba13 /routers/api/v1/misc/markdown.go
parent7b297808cee599f5ff58b9f6afa64d3ee980998e (diff)
downloadgitea-7b104f0cd03cf3df2b10f6f447857fe389654df1.tar.gz
gitea-7b104f0cd03cf3df2b10f6f447857fe389654df1.zip
Populate URL field of API commits (#3546)
* Populate URL field of API commits * fix orgmode_test
Diffstat (limited to 'routers/api/v1/misc/markdown.go')
-rw-r--r--routers/api/v1/misc/markdown.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/misc/markdown.go b/routers/api/v1/misc/markdown.go
index ed50c1c05b..fd7d1489b3 100644
--- a/routers/api/v1/misc/markdown.go
+++ b/routers/api/v1/misc/markdown.go
@@ -8,9 +8,9 @@ import (
api "code.gitea.io/sdk/gitea"
"code.gitea.io/gitea/modules/context"
- "code.gitea.io/gitea/modules/markup"
"code.gitea.io/gitea/modules/markup/markdown"
"code.gitea.io/gitea/modules/setting"
+ "code.gitea.io/gitea/modules/util"
)
// Markdown render markdown document to HTML
@@ -45,7 +45,7 @@ func Markdown(ctx *context.APIContext, form api.MarkdownOption) {
switch form.Mode {
case "gfm":
md := []byte(form.Text)
- context := markup.URLJoin(setting.AppURL, form.Context)
+ context := util.URLJoin(setting.AppURL, form.Context)
if form.Wiki {
ctx.Write([]byte(markdown.RenderWiki(md, context, nil)))
} else {