aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-25 20:10:25 -0500
committerUnknwon <u@gogs.io>2015-11-25 20:10:25 -0500
commit2b10fdc4dcb987b347b031f460cf4f02fd48a31a (patch)
treef3f723c75684c4213a58d57a2ce0b6afdc597d25 /routers/api
parent2f28a0310b0f391dd74bb3a2ab0ae06379a4fb1a (diff)
downloadgitea-2b10fdc4dcb987b347b031f460cf4f02fd48a31a.tar.gz
gitea-2b10fdc4dcb987b347b031f460cf4f02fd48a31a.zip
Wiki: UI for page new
Diffstat (limited to 'routers/api')
-rw-r--r--routers/api/v1/miscellaneous.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/routers/api/v1/miscellaneous.go b/routers/api/v1/miscellaneous.go
index 7ffce85761..dd611b2e70 100644
--- a/routers/api/v1/miscellaneous.go
+++ b/routers/api/v1/miscellaneous.go
@@ -5,12 +5,9 @@
package v1
import (
- "strings"
-
"github.com/gogits/gogs/modules/auth/apiv1"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/middleware"
- "github.com/gogits/gogs/modules/setting"
)
// Render an arbitrary Markdown document.
@@ -27,8 +24,7 @@ func Markdown(ctx *middleware.Context, form apiv1.MarkdownForm) {
switch form.Mode {
case "gfm":
- ctx.Write(base.RenderMarkdown([]byte(form.Text),
- setting.AppUrl+strings.TrimPrefix(form.Context, "/")))
+ ctx.Write(base.RenderMarkdown([]byte(form.Text), form.Context))
default:
ctx.Write(base.RenderRawMarkdown([]byte(form.Text), ""))
}