diff options
author | Rinat <paladin2012gnu@gmail.com> | 2019-09-06 03:39:54 +0300 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-09-05 20:39:54 -0400 |
commit | b660a732ae283d863636ead9cc1a365ce1c0edc1 (patch) | |
tree | d4ed1987a44e5f1a0c1c23068f0aaa2c238e32c4 /models/action.go | |
parent | 79c8bc0e51db9ef1579b72d0510cac9aaded06db (diff) | |
download | gitea-b660a732ae283d863636ead9cc1a365ce1c0edc1.tar.gz gitea-b660a732ae283d863636ead9cc1a365ce1c0edc1.zip |
feat: highlight issue references with : (#8101)
* feat: highlight issue references with :
e.g. #1287: my commit msg
e.g. ABC-1234: my commit msg
* ref: update model regex to consistent with issueNumericPattern
* test: check highlight issue with : in commits messages
Diffstat (limited to 'models/action.go')
-rw-r--r-- | models/action.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/action.go b/models/action.go index d3b53f6738..87088101f9 100644 --- a/models/action.go +++ b/models/action.go @@ -65,7 +65,7 @@ var ( ) const issueRefRegexpStr = `(?:([0-9a-zA-Z-_\.]+)/([0-9a-zA-Z-_\.]+))?(#[0-9]+)+` -const issueRefRegexpStrNoKeyword = `(?:\s|^|\(|\[)(?:([0-9a-zA-Z-_\.]+)/([0-9a-zA-Z-_\.]+))?(#[0-9]+)(?:\s|$|\)|\]|\.(\s|$))` +const issueRefRegexpStrNoKeyword = `(?:\s|^|\(|\[)(?:([0-9a-zA-Z-_\.]+)/([0-9a-zA-Z-_\.]+))?(#[0-9]+)(?:\s|$|\)|\]|:|\.(\s|$))` func assembleKeywordsPattern(words []string) string { return fmt.Sprintf(`(?i)(?:%s)(?::?) %s`, strings.Join(words, "|"), issueRefRegexpStr) |