Tweak single-word label regex to fix pending spec.

This commit is contained in:
Douwe Maan 2015-04-17 14:40:02 +02:00 committed by Robert Speicher
parent b5802d144b
commit c52bf4ad3c
2 changed files with 1 additions and 2 deletions

View file

@ -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
)
)

View file

@ -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