mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-09-23 16:32:44 +08:00
Fix and refactor markdown rendering (#32522)
This commit is contained in:
@ -21,7 +21,7 @@ func (g *ASTTransformer) transformImage(ctx *markup.RenderContext, v *ast.Image)
|
||||
// Check if the destination is a real link
|
||||
if len(v.Destination) > 0 && !markup.IsFullURLBytes(v.Destination) {
|
||||
v.Destination = []byte(giteautil.URLJoin(
|
||||
ctx.Links.ResolveMediaLink(ctx.ContentMode == markup.RenderContentAsWiki),
|
||||
ctx.Links.ResolveMediaLink(ctx.IsMarkupContentWiki()),
|
||||
strings.TrimLeft(string(v.Destination), "/"),
|
||||
))
|
||||
}
|
||||
|
Reference in New Issue
Block a user