@@ -609,7 +609,7 @@ func mentionProcessor(ctx *RenderContext, node *html.Node) {
609609 if ok && strings .Contains (mention , "/" ) {
610610 mentionOrgAndTeam := strings .Split (mention , "/" )
611611 if mentionOrgAndTeam [0 ][1 :] == ctx .Metas ["org" ] && strings .Contains (teams , "," + strings .ToLower (mentionOrgAndTeam [1 ])+ "," ) {
612- replaceContent (node , loc .Start , loc .End , createLink (util .URLJoin (setting . AppURL , "org" , ctx .Metas ["org" ], "teams" , mentionOrgAndTeam [1 ]), mention , "mention" ))
612+ replaceContent (node , loc .Start , loc .End , createLink (util .URLJoin (ctx . Links . Prefix () , "org" , ctx .Metas ["org" ], "teams" , mentionOrgAndTeam [1 ]), mention , "mention" ))
613613 node = node .NextSibling .NextSibling
614614 start = 0
615615 continue
@@ -620,7 +620,7 @@ func mentionProcessor(ctx *RenderContext, node *html.Node) {
620620 mentionedUsername := mention [1 :]
621621
622622 if DefaultProcessorHelper .IsUsernameMentionable != nil && DefaultProcessorHelper .IsUsernameMentionable (ctx .Ctx , mentionedUsername ) {
623- replaceContent (node , loc .Start , loc .End , createLink (util .URLJoin (setting . AppURL , mentionedUsername ), mention , "mention" ))
623+ replaceContent (node , loc .Start , loc .End , createLink (util .URLJoin (ctx . Links . Prefix () , mentionedUsername ), mention , "mention" ))
624624 node = node .NextSibling .NextSibling
625625 } else {
626626 node = node .NextSibling
@@ -898,9 +898,9 @@ func issueIndexPatternProcessor(ctx *RenderContext, node *html.Node) {
898898 path = "pulls"
899899 }
900900 if ref .Owner == "" {
901- link = createLink (util .URLJoin (setting . AppURL , ctx .Metas ["user" ], ctx .Metas ["repo" ], path , ref .Issue ), reftext , "ref-issue" )
901+ link = createLink (util .URLJoin (ctx . Links . Prefix () , ctx .Metas ["user" ], ctx .Metas ["repo" ], path , ref .Issue ), reftext , "ref-issue" )
902902 } else {
903- link = createLink (util .URLJoin (setting . AppURL , ref .Owner , ref .Name , path , ref .Issue ), reftext , "ref-issue" )
903+ link = createLink (util .URLJoin (ctx . Links . Prefix () , ref .Owner , ref .Name , path , ref .Issue ), reftext , "ref-issue" )
904904 }
905905 }
906906
@@ -939,7 +939,7 @@ func commitCrossReferencePatternProcessor(ctx *RenderContext, node *html.Node) {
939939 }
940940
941941 reftext := ref .Owner + "/" + ref .Name + "@" + base .ShortSha (ref .CommitSha )
942- link := createLink (util .URLJoin (setting . AppSubURL , ref .Owner , ref .Name , "commit" , ref .CommitSha ), reftext , "commit" )
942+ link := createLink (util .URLJoin (ctx . Links . Prefix () , ref .Owner , ref .Name , "commit" , ref .CommitSha ), reftext , "commit" )
943943
944944 replaceContent (node , ref .RefLocation .Start , ref .RefLocation .End , link )
945945 node = node .NextSibling .NextSibling
@@ -1166,7 +1166,7 @@ func hashCurrentPatternProcessor(ctx *RenderContext, node *html.Node) {
11661166 continue
11671167 }
11681168
1169- link := util .URLJoin (setting . AppURL , ctx .Metas ["user" ], ctx .Metas ["repo" ], "commit" , hash )
1169+ link := util .URLJoin (ctx . Links . Prefix () , ctx .Metas ["user" ], ctx .Metas ["repo" ], "commit" , hash )
11701170 replaceContent (node , m [2 ], m [3 ], createCodeLink (link , base .ShortSha (hash ), "commit" ))
11711171 start = 0
11721172 node = node .NextSibling .NextSibling
0 commit comments