Commit 129bb6c2 authored by Rémy Coutable's avatar Rémy Coutable

Address Yorick's feedback

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent f29d8b64
......@@ -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}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment