diff options
author | Unknwon <u@gogs.io> | 2015-11-15 16:23:55 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-11-15 16:23:55 -0500 |
commit | 35d49d3b34983cb6ae2b0931ddba8132e1f494c4 (patch) | |
tree | 9b0545715a6e6dadc2ab47050ae02dda511784fc /modules | |
parent | 4d3138cd1074a29b7f68227f6a900344136cabe9 (diff) | |
parent | ca5678da3268706b8516a52ef945742792c297a0 (diff) | |
download | gitea-35d49d3b34983cb6ae2b0931ddba8132e1f494c4.tar.gz gitea-35d49d3b34983cb6ae2b0931ddba8132e1f494c4.zip |
Merge pull request #1949 from TheHowl/develop
Fix bad issue links in non-readme markdown files
Diffstat (limited to 'modules')
-rw-r--r-- | modules/base/markdown.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/base/markdown.go b/modules/base/markdown.go index 8f3d6bef1a..9d297f0ce8 100644 --- a/modules/base/markdown.go +++ b/modules/base/markdown.go @@ -168,6 +168,9 @@ func RenderSha1CurrentPattern(rawBytes []byte, urlPrefix string) []byte { } func RenderIssueIndexPattern(rawBytes []byte, urlPrefix string) []byte { + if i := strings.Index(urlPrefix, "/src"); i != -1 { + urlPrefix = urlPrefix[:i] + } ms := issueIndexPattern.FindAll(rawBytes, -1) for _, m := range ms { var space string |