mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-05 09:55:20 +02:00
Fixed #209
This commit is contained in:
parent
87854c95a9
commit
688ec6ecbd
37 changed files with 693 additions and 482 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"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"
|
||||
)
|
||||
|
||||
const DOC_URL = "http://gogs.io/docs"
|
||||
|
@ -25,7 +26,7 @@ func Markdown(ctx *middleware.Context, form apiv1.MarkdownForm) {
|
|||
switch form.Mode {
|
||||
case "gfm":
|
||||
ctx.Write(base.RenderMarkdown([]byte(form.Text),
|
||||
base.AppUrl+strings.TrimPrefix(form.Context, "/")))
|
||||
setting.AppUrl+strings.TrimPrefix(form.Context, "/")))
|
||||
default:
|
||||
ctx.Write(base.RenderRawMarkdown([]byte(form.Text), ""))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue