Address Yorick's feedback
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
f29d8b64e4
commit
129bb6c2a7
2 changed files with 2 additions and 4 deletions
|
@ -2,8 +2,6 @@ Please view this file on the master branch, on stable branches it's out of date.
|
|||
|
||||
v 8.8.0 (unreleased)
|
||||
- Implement GFM references for milestones (Alejandro Rodríguez)
|
||||
|
||||
v 8.7.1 (unreleased)
|
||||
- Snippets tab under user profile. !4001 (Long Nguyen)
|
||||
- Fix error when using link to uploads in global snippets
|
||||
- Assign labels and milestone to target project when moving issue. !3934 (Long Nguyen)
|
||||
|
|
|
@ -67,7 +67,7 @@ class Milestone < ActiveRecord::Base
|
|||
# NOTE: The iid pattern only matches when all characters on the expression
|
||||
# are digits, so it will match %2 but not %2.1 because that's probably a
|
||||
# milestone name and we want it to be matched as such.
|
||||
%r{
|
||||
@reference_pattern ||= %r{
|
||||
(#{Project.reference_pattern})?
|
||||
#{Regexp.escape(reference_prefix)}
|
||||
(?:
|
||||
|
@ -195,7 +195,7 @@ class Milestone < ActiveRecord::Base
|
|||
private
|
||||
|
||||
def milestone_format_reference(format = :iid)
|
||||
raise StandardError, 'Unknown format' unless [:iid, :name].include?(format)
|
||||
raise ArgumentError, 'Unknown format' unless [:iid, :name].include?(format)
|
||||
|
||||
if format == :name && !name.include?('"')
|
||||
%("#{name}")
|
||||
|
|
Loading…
Reference in a new issue