]> source.dussan.org Git - gitea.git/commitdiff
#2161 fix wrong regexp
authorUnknwon <u@gogs.io>
Sat, 12 Dec 2015 21:13:18 +0000 (16:13 -0500)
committerUnknwon <u@gogs.io>
Sat, 12 Dec 2015 21:13:18 +0000 (16:13 -0500)
modules/base/markdown.go

index 199e88f97321f489edb99f1116e4f96f775580c3..04547786409d8486405ecbc06f752d02d70c97c9 100644 (file)
@@ -133,7 +133,7 @@ var (
        MentionPattern     = regexp.MustCompile(`(\s|^)@[0-9a-zA-Z_\.]+`)
        commitPattern      = regexp.MustCompile(`(\s|^)https?.*commit/[0-9a-zA-Z]+(#+[0-9a-zA-Z-]*)?`)
        issueFullPattern   = regexp.MustCompile(`(\s|^)https?.*issues/[0-9]+(#+[0-9a-zA-Z-]*)?`)
-       issueIndexPattern  = regexp.MustCompile(`(^|\W)#[0-9]+\b`)
+       issueIndexPattern  = regexp.MustCompile(`( |^|\()#[0-9]+\b`)
        sha1CurrentPattern = regexp.MustCompile(`\b[0-9a-f]{40}\b`)
 )