diff options
author | Unknwon <joe2010xtmf@163.com> | 2015-02-06 19:15:58 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2015-02-06 19:15:58 -0500 |
commit | 066989722626deb9e0de1ea0cbe158aa387d8d26 (patch) | |
tree | d37d897c11298c6134d4e430542e9a76c135a9b3 /modules/base | |
parent | ddddad9792d203c3ac3e6406aac0bf38235018dd (diff) | |
download | gitea-066989722626deb9e0de1ea0cbe158aa387d8d26.tar.gz gitea-066989722626deb9e0de1ea0cbe158aa387d8d26.zip |
modules/base: fix markdown mention regex for #826
- conf/locale: add mew translator profile
Diffstat (limited to 'modules/base')
-rw-r--r-- | modules/base/markdown.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/base/markdown.go b/modules/base/markdown.go index 87aafda3e1..4122098618 100644 --- a/modules/base/markdown.go +++ b/modules/base/markdown.go @@ -106,7 +106,7 @@ func (options *CustomRender) Image(out *bytes.Buffer, link []byte, title []byte, } var ( - MentionPattern = regexp.MustCompile(`(\s@)[0-9a-zA-Z_]{1,}`) + MentionPattern = regexp.MustCompile(`((^|\s)@)[0-9a-zA-Z_]{1,}`) 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(`( |^)#[0-9]+`) |