mirror of
https://github.com/go-gitea/gitea
synced 2025-07-14 22:47:21 +00:00
Use relative links for commits, mentions, and issues in markdown (#29427)
Fixes #29404 Use relative links for - commits - mentions - issues --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
@ -34,7 +34,8 @@ func RenderMarkup(ctx *context.Base, repo *context.Repository, mode, text, urlPr
|
||||
if err := markdown.RenderRaw(&markup.RenderContext{
|
||||
Ctx: ctx,
|
||||
Links: markup.Links{
|
||||
Base: urlPrefix,
|
||||
AbsolutePrefix: true,
|
||||
Base: urlPrefix,
|
||||
},
|
||||
}, strings.NewReader(text), ctx.Resp); err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, err.Error())
|
||||
@ -79,7 +80,8 @@ func RenderMarkup(ctx *context.Base, repo *context.Repository, mode, text, urlPr
|
||||
if err := markup.Render(&markup.RenderContext{
|
||||
Ctx: ctx,
|
||||
Links: markup.Links{
|
||||
Base: urlPrefix,
|
||||
AbsolutePrefix: true,
|
||||
Base: urlPrefix,
|
||||
},
|
||||
Metas: meta,
|
||||
IsWiki: wiki,
|
||||
|
Reference in New Issue
Block a user