aboutsummaryrefslogtreecommitdiffstats
path: root/modules/base
diff options
context:
space:
mode:
Diffstat (limited to 'modules/base')
-rw-r--r--modules/base/markdown.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/base/markdown.go b/modules/base/markdown.go
index 70c2918af0..9d297f0ce8 100644
--- a/modules/base/markdown.go
+++ b/modules/base/markdown.go
@@ -168,9 +168,9 @@ func RenderSha1CurrentPattern(rawBytes []byte, urlPrefix string) []byte {
}
func RenderIssueIndexPattern(rawBytes []byte, urlPrefix string) []byte {
- // Remove unnecessary things after username and reponame in prefix
- // (otherwise stuff like /:user/:repo/src/master/issues/1 would happen)
- urlPrefix = strings.Join(strings.Split(urlPrefix, "/")[:3], "/")
+ if i := strings.Index(urlPrefix, "/src"); i != -1 {
+ urlPrefix = urlPrefix[:i]
+ }
ms := issueIndexPattern.FindAll(rawBytes, -1)
for _, m := range ms {
var space string