summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gitlab/markdown/label_reference_filter.rb2
-rw-r--r--spec/lib/gitlab/markdown/label_reference_filter_spec.rb1
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/gitlab/markdown/label_reference_filter.rb b/lib/gitlab/markdown/label_reference_filter.rb
index f40b981ba60..4c21192c0d3 100644
--- a/lib/gitlab/markdown/label_reference_filter.rb
+++ b/lib/gitlab/markdown/label_reference_filter.rb
@@ -27,7 +27,7 @@ module Gitlab
~(
(?<label_id>\d+) | # Integer-based label ID, or
(?<label_name>
- [^'"&\?,\s]+ | # String-based single-word label title
+ [A-Za-z0-9_-]+ | # String-based single-word label title
['"][^&\?,]+['"] # String-based multi-word label surrounded in quotes
)
)
diff --git a/spec/lib/gitlab/markdown/label_reference_filter_spec.rb b/spec/lib/gitlab/markdown/label_reference_filter_spec.rb
index 2258889cb51..c84e568e172 100644
--- a/spec/lib/gitlab/markdown/label_reference_filter_spec.rb
+++ b/spec/lib/gitlab/markdown/label_reference_filter_spec.rb
@@ -84,7 +84,6 @@ module Gitlab::Markdown
end
it 'links with adjacent text' do
- skip 'FIXME (rspeicher): This will fail, because a period and parentheses are both currently valid in label names.'
doc = filter("Label (#{reference}.)")
expect(doc.to_html).to match(%r(\(<a.+><span.+>#{label.name}</span></a>\.\)))
end