summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-12 16:13:18 -0500
committerUnknwon <u@gogs.io>2015-12-12 16:13:18 -0500
commit7e88420bc6591c1d352bd893f2f7e72f9495b869 (patch)
tree6aa62a2b017e2c0004979bcedb9ba600efb0a6ac
parent5911fc3512c81af1c7a3f2e8478171dff5b989d6 (diff)
downloadgitea-7e88420bc6591c1d352bd893f2f7e72f9495b869.tar.gz
gitea-7e88420bc6591c1d352bd893f2f7e72f9495b869.zip
#2161 fix wrong regexp
-rw-r--r--modules/base/markdown.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/base/markdown.go b/modules/base/markdown.go
index 199e88f973..0454778640 100644
--- a/modules/base/markdown.go
+++ b/modules/base/markdown.go
@@ -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`)
)