summaryrefslogtreecommitdiffstats
path: root/modules/base/markdown.go
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2015-02-06 20:34:49 -0500
committerUnknwon <joe2010xtmf@163.com>2015-02-06 20:34:49 -0500
commitafccd0a3eeb070100b375cd9bb83cd5b213d01b3 (patch)
tree891895df023a6884a0258b49eb4469bb421aee42 /modules/base/markdown.go
parent066989722626deb9e0de1ea0cbe158aa387d8d26 (diff)
downloadgitea-afccd0a3eeb070100b375cd9bb83cd5b213d01b3.tar.gz
gitea-afccd0a3eeb070100b375cd9bb83cd5b213d01b3.zip
models/action.go: mirror fix on #892
- modules/base/markdown.go: fix issue link issue - routers/repo/view.go: remove useless code
Diffstat (limited to 'modules/base/markdown.go')
-rw-r--r--modules/base/markdown.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/base/markdown.go b/modules/base/markdown.go
index 4122098618..b5f397dce0 100644
--- a/modules/base/markdown.go
+++ b/modules/base/markdown.go
@@ -177,8 +177,8 @@ func RenderSha1CurrentPattern(rawBytes []byte, urlPrefix string) []byte {
func RenderIssueIndexPattern(rawBytes []byte, urlPrefix string) []byte {
ms := issueIndexPattern.FindAll(rawBytes, -1)
for _, m := range ms {
- rawBytes = bytes.Replace(rawBytes, m, []byte(fmt.Sprintf(
- `<a href="%s/issues/%s">%s</a>`, urlPrefix, m[1:], m)), -1)
+ rawBytes = bytes.Replace(rawBytes, m, []byte(fmt.Sprintf(`<a href="%s/issues/%s">%s</a>`,
+ urlPrefix, strings.TrimPrefix(string(m[1:]), "#"), m)), -1)
}
return rawBytes
}