Refactor markup render system (#32589)
This PR mainly moves some code and introduces `RenderContext.WithXxx` functions
This commit is contained in:
parent
81ac8d914c
commit
c4e27cb27b
49 changed files with 486 additions and 626 deletions
|
@ -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.IsMarkupContentWiki()),
|
||||
ctx.RenderOptions.Links.ResolveMediaLink(ctx.IsMarkupContentWiki()),
|
||||
strings.TrimLeft(string(v.Destination), "/"),
|
||||
))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue