@@ -609,7 +609,7 @@ func mentionProcessor(ctx *RenderContext, node *html.Node) {
609
609
if ok && strings .Contains (mention , "/" ) {
610
610
mentionOrgAndTeam := strings .Split (mention , "/" )
611
611
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" ))
613
613
node = node .NextSibling .NextSibling
614
614
start = 0
615
615
continue
@@ -620,7 +620,7 @@ func mentionProcessor(ctx *RenderContext, node *html.Node) {
620
620
mentionedUsername := mention [1 :]
621
621
622
622
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" ))
624
624
node = node .NextSibling .NextSibling
625
625
} else {
626
626
node = node .NextSibling
@@ -898,9 +898,9 @@ func issueIndexPatternProcessor(ctx *RenderContext, node *html.Node) {
898
898
path = "pulls"
899
899
}
900
900
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" )
902
902
} 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" )
904
904
}
905
905
}
906
906
@@ -939,7 +939,7 @@ func commitCrossReferencePatternProcessor(ctx *RenderContext, node *html.Node) {
939
939
}
940
940
941
941
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" )
943
943
944
944
replaceContent (node , ref .RefLocation .Start , ref .RefLocation .End , link )
945
945
node = node .NextSibling .NextSibling
@@ -1166,7 +1166,7 @@ func hashCurrentPatternProcessor(ctx *RenderContext, node *html.Node) {
1166
1166
continue
1167
1167
}
1168
1168
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 )
1170
1170
replaceContent (node , m [2 ], m [3 ], createCodeLink (link , base .ShortSha (hash ), "commit" ))
1171
1171
start = 0
1172
1172
node = node .NextSibling .NextSibling
0 commit comments