Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 91a6ae4

Browse files
authoredMay 9, 2021
Merge branch 'main' into comment-out-app.example.ini
2 parents 98b2b89 + 17a7797 commit 91a6ae4

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed
 

‎modules/references/references.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var (
2929
// mentionPattern matches all mentions in the form of "@user" or "@org/team"
3030
mentionPattern = regexp.MustCompile(`(?:\s|^|\(|\[)(@[0-9a-zA-Z-_]+|@[0-9a-zA-Z-_]+\/?[0-9a-zA-Z-_]+|@[0-9a-zA-Z-_][0-9a-zA-Z-_.]+\/?[0-9a-zA-Z-_.]+[0-9a-zA-Z-_])(?:\s|[:,;.?!]\s|[:,;.?!]?$|\)|\])`)
3131
// issueNumericPattern matches string that references to a numeric issue, e.g. #1287
32-
issueNumericPattern = regexp.MustCompile(`(?:\s|^|\(|\[)([#!][0-9]+)(?:\s|$|\)|\]|[:;,.?!]\s|[:;,.?!]$)`)
32+
issueNumericPattern = regexp.MustCompile(`(?:\s|^|\(|\[|\')([#!][0-9]+)(?:\s|$|\)|\]|[:;,.?!]\s|[:;,.?!]$)`)
3333
// issueAlphanumericPattern matches string that references to an alphanumeric issue, e.g. ABC-1234
3434
issueAlphanumericPattern = regexp.MustCompile(`(?:\s|^|\(|\[)([A-Z]{1,10}-[1-9][0-9]*)(?:\s|$|\)|\]|:|\.(\s|$))`)
3535
// crossReferenceIssueNumericPattern matches string that references a numeric issue in a different repository

‎modules/references/references_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,13 @@ func TestFindAllIssueReferences(t *testing.T) {
197197
{200, "user3", "repo4", "200", false, XRefActionNone, &RefSpan{Start: 5, End: 20}, nil, ""},
198198
},
199199
},
200+
{
201+
"Merge pull request '#12345 My fix for a bug' (!1337) from feature-branch into main",
202+
[]testResult{
203+
{12345, "", "", "12345", false, XRefActionNone, &RefSpan{Start: 20, End: 26}, nil, ""},
204+
{1337, "", "", "1337", true, XRefActionNone, &RefSpan{Start: 46, End: 51}, nil, ""},
205+
},
206+
},
200207
{
201208
"Which abc. #9434 same as above",
202209
[]testResult{

‎modules/templates/helper.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ func ReactionToEmoji(reaction string) template.HTML {
766766
if val != nil {
767767
return template.HTML(val.Emoji)
768768
}
769-
return template.HTML(fmt.Sprintf(`<img alt=":%s:" src="%s/img/emoji/%s.png"></img>`, reaction, setting.StaticURLPrefix, reaction))
769+
return template.HTML(fmt.Sprintf(`<img alt=":%s:" src="%s/assets/img/emoji/%s.png"></img>`, reaction, setting.StaticURLPrefix, reaction))
770770
}
771771

772772
// RenderNote renders the contents of a git-notes file as a commit message.

‎routers/routes/web.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ func WebRoutes() *web.Route {
173173

174174
// this png is very likely to always be below the limit for gzip so it doesn't need to pass through gzip
175175
routes.Get("/apple-touch-icon.png", func(w http.ResponseWriter, req *http.Request) {
176-
http.Redirect(w, req, path.Join(setting.StaticURLPrefix, "img/apple-touch-icon.png"), 301)
176+
http.Redirect(w, req, path.Join(setting.StaticURLPrefix, "/assets/img/apple-touch-icon.png"), 301)
177177
})
178178

179179
gob.Register(&u2f.Challenge{})

0 commit comments

Comments
 (0)
Please sign in to comment.