Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
c52bf4ad
Commit
c52bf4ad
authored
Apr 17, 2015
by
Douwe Maan
Committed by
Robert Speicher
Apr 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak single-word label regex to fix pending spec.
parent
b5802d14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
2 deletions
+1
-2
lib/gitlab/markdown/label_reference_filter.rb
lib/gitlab/markdown/label_reference_filter.rb
+1
-1
spec/lib/gitlab/markdown/label_reference_filter_spec.rb
spec/lib/gitlab/markdown/label_reference_filter_spec.rb
+0
-1
No files found.
lib/gitlab/markdown/label_reference_filter.rb
View file @
c52bf4ad
...
@@ -27,7 +27,7 @@ module Gitlab
...
@@ -27,7 +27,7 @@ module Gitlab
~(
~(
(?<label_id>
\d
+) | # Integer-based label ID, or
(?<label_id>
\d
+) | # Integer-based label ID, or
(?<label_name>
(?<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
['"][^&
\?
,]+['"] # String-based multi-word label surrounded in quotes
)
)
)
)
...
...
spec/lib/gitlab/markdown/label_reference_filter_spec.rb
View file @
c52bf4ad
...
@@ -84,7 +84,6 @@ module Gitlab::Markdown
...
@@ -84,7 +84,6 @@ module Gitlab::Markdown
end
end
it
'links with adjacent text'
do
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
}
.)"
)
doc
=
filter
(
"Label (
#{
reference
}
.)"
)
expect
(
doc
.
to_html
).
to
match
(
%r(
\(
<a.+><span.+>
#{
label
.
name
}
</span></a>
\.\)
)
)
expect
(
doc
.
to_html
).
to
match
(
%r(
\(
<a.+><span.+>
#{
label
.
name
}
</span></a>
\.\)
)
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment