Skip to content

Commit 729731f

Browse files
Extend regex to match URLs to repos/users with dashes
1 parent 7232ebc commit 729731f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/markup/html.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ var issueFullPatternOnce sync.Once
9999
func getIssueFullPattern() *regexp.Regexp {
100100
issueFullPatternOnce.Do(func() {
101101
issueFullPattern = regexp.MustCompile(regexp.QuoteMeta(setting.AppURL) +
102-
`\w+/\w+/(?:issues|pulls)/((?:\w{1,10}-)?[1-9][0-9]*)([\?|#](\S+)?)?\b`)
102+
`[\w_.-]+/[\w_.-]+/(?:issues|pulls)/((?:\w{1,10}-)?[1-9][0-9]*)([\?|#](\S+)?)?\b`)
103103
})
104104
return issueFullPattern
105105
}

0 commit comments

Comments
 (0)