|
|
@ -38,9 +38,9 @@ var ( |
|
|
|
MentionPattern = regexp.MustCompile(`(\s|^|\W)@[0-9a-zA-Z-_\.]+`) |
|
|
|
MentionPattern = regexp.MustCompile(`(\s|^|\W)@[0-9a-zA-Z-_\.]+`) |
|
|
|
|
|
|
|
|
|
|
|
// IssueNumericPattern matches string that references to a numeric issue, e.g. #1287
|
|
|
|
// IssueNumericPattern matches string that references to a numeric issue, e.g. #1287
|
|
|
|
IssueNumericPattern = regexp.MustCompile(`( |^|\()#[0-9]+\b`) |
|
|
|
IssueNumericPattern = regexp.MustCompile(`( |^|\(|\[)#[0-9]+\b`) |
|
|
|
// IssueAlphanumericPattern matches string that references to an alphanumeric issue, e.g. ABC-1234
|
|
|
|
// IssueAlphanumericPattern matches string that references to an alphanumeric issue, e.g. ABC-1234
|
|
|
|
IssueAlphanumericPattern = regexp.MustCompile(`( |^|\()[A-Z]{1,10}-[1-9][0-9]*\b`) |
|
|
|
IssueAlphanumericPattern = regexp.MustCompile(`( |^|\(|\[)[A-Z]{1,10}-[1-9][0-9]*\b`) |
|
|
|
// CrossReferenceIssueNumericPattern matches string that references a numeric issue in a different repository
|
|
|
|
// CrossReferenceIssueNumericPattern matches string that references a numeric issue in a different repository
|
|
|
|
// e.g. gogits/gogs#12345
|
|
|
|
// e.g. gogits/gogs#12345
|
|
|
|
CrossReferenceIssueNumericPattern = regexp.MustCompile(`( |^)[0-9a-zA-Z-_\.]+/[0-9a-zA-Z-_\.]+#[0-9]+\b`) |
|
|
|
CrossReferenceIssueNumericPattern = regexp.MustCompile(`( |^)[0-9a-zA-Z-_\.]+/[0-9a-zA-Z-_\.]+#[0-9]+\b`) |
|
|
|