Fix and refactor markdown rendering (#32522)
This commit is contained in:
parent
e546480d0a
commit
5eebe1dc5f
27 changed files with 289 additions and 278 deletions
|
@ -144,15 +144,14 @@ func (r *Writer) resolveLink(kind, link string) string {
|
|||
}
|
||||
|
||||
base := r.Ctx.Links.Base
|
||||
isWiki := r.Ctx.ContentMode == markup.RenderContentAsWiki
|
||||
if isWiki {
|
||||
if r.Ctx.IsMarkupContentWiki() {
|
||||
base = r.Ctx.Links.WikiLink()
|
||||
} else if r.Ctx.Links.HasBranchInfo() {
|
||||
base = r.Ctx.Links.SrcLink()
|
||||
}
|
||||
|
||||
if kind == "image" || kind == "video" {
|
||||
base = r.Ctx.Links.ResolveMediaLink(isWiki)
|
||||
base = r.Ctx.Links.ResolveMediaLink(r.Ctx.IsMarkupContentWiki())
|
||||
}
|
||||
|
||||
link = util.URLJoin(base, link)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue