From d7bdc1de8d98d7f58971f822e10c1650a450b194 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 23 Jul 2016 17:29:34 +0800 Subject: [PATCH] #3107 fix mention regex does not include dash --- modules/markdown/markdown.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/markdown/markdown.go b/modules/markdown/markdown.go index d49c14d1f..20fe2a77f 100644 --- a/modules/markdown/markdown.go +++ b/modules/markdown/markdown.go @@ -75,7 +75,7 @@ func IsReadmeFile(name string) bool { var ( // MentionPattern matches string that mentions someone, e.g. @Unknwon - MentionPattern = regexp.MustCompile(`(\s|^)@[0-9a-zA-Z_\.]+`) + MentionPattern = regexp.MustCompile(`(\s|^)@[0-9a-zA-Z-_\.]+`) // CommitPattern matches link to certain commit with or without trailing hash, // e.g. https://try.gogs.io/gogs/gogs/commit/d8a994ef243349f321568f9e36d5c3f444b99cae#diff-2