1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 23:17:19 +00:00

modules/base: fix markdown mention regex for #826

- conf/locale: add mew translator profile
This commit is contained in:
Unknwon
2015-02-06 19:15:58 -05:00
parent ddddad9792
commit 0669897226
6 changed files with 86 additions and 82 deletions

View File

@@ -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]+`)