Freeze regexp and add a comment
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8620#note_21590440
This commit is contained in:
parent
849d09cfd6
commit
2f80cbb675
1 changed files with 3 additions and 1 deletions
|
@ -35,12 +35,14 @@ module Gitlab
|
|||
end
|
||||
|
||||
def key_from_fallback_message_id(mail_id)
|
||||
message_id_regexp = /\Areply\-(.+)@#{Gitlab.config.gitlab.host}\z/
|
||||
message_id_regexp =
|
||||
/\Areply\-(.+)@#{Gitlab.config.gitlab.host}\z/.freeze
|
||||
|
||||
mail_id[message_id_regexp, 1]
|
||||
end
|
||||
|
||||
def scan_fallback_references(references)
|
||||
# It's looking for each <...>
|
||||
references.scan(/(?!<)[^<>]+(?=>)/.freeze)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue