File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -574,6 +574,7 @@ func NewTextFuncMap() []texttmpl.FuncMap {
574
574
return sum
575
575
},
576
576
"QueryEscape" : url .QueryEscape ,
577
+ "HasPrefix" : strings .HasPrefix ,
577
578
}}
578
579
}
579
580
Original file line number Diff line number Diff line change 206
206
{{end}}
207
207
208
208
{{if or (.Permission.CanRead $.UnitTypeWiki) (.Permission.CanRead $.UnitTypeExternalWiki)}}
209
- <a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki" {{if (.Permission.CanRead $.UnitTypeExternalWiki)}} target="_blank" rel="noopener noreferrer" {{end}}>
209
+ <a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki" {{if and (.Permission.CanRead $.UnitTypeExternalWiki) (not (HasPrefix ((.Repository.MustGetUnit $.UnitTypeExternalWiki).ExternalWikiConfig.ExternalWikiURL) (.Repository.HTMLURL)) )}} target="_blank" rel="noopener noreferrer" {{end}}>
210
210
{{svg "octicon-book"}} {{.i18n.Tr "repo.wiki"}}
211
211
</a>
212
212
{{end}}
You can’t perform that action at this time.
0 commit comments