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
Tatuya Kamada
gitlab-ce
Commits
9aac53bc
Commit
9aac53bc
authored
Dec 02, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Satisfy Rubocop
parent
2f5074dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
app/models/commit_range.rb
app/models/commit_range.rb
+1
-1
spec/lib/gitlab/markdown/commit_reference_filter_spec.rb
spec/lib/gitlab/markdown/commit_reference_filter_spec.rb
+1
-1
spec/lib/gitlab/markdown/snippet_reference_filter_spec.rb
spec/lib/gitlab/markdown/snippet_reference_filter_spec.rb
+1
-1
No files found.
app/models/commit_range.rb
View file @
9aac53bc
...
@@ -93,7 +93,7 @@ class CommitRange
...
@@ -93,7 +93,7 @@ class CommitRange
def
to_reference
(
from_project
=
nil
)
def
to_reference
(
from_project
=
nil
)
if
cross_project_reference?
(
from_project
)
if
cross_project_reference?
(
from_project
)
reference
=
project
.
to_reference
+
self
.
class
.
reference_prefix
+
self
.
id
project
.
to_reference
+
self
.
class
.
reference_prefix
+
self
.
id
else
else
self
.
id
self
.
id
end
end
...
...
spec/lib/gitlab/markdown/commit_reference_filter_spec.rb
View file @
9aac53bc
...
@@ -152,7 +152,7 @@ module Gitlab::Markdown
...
@@ -152,7 +152,7 @@ module Gitlab::Markdown
end
end
it
'ignores invalid commit IDs on the referenced project'
do
it
'ignores invalid commit IDs on the referenced project'
do
exp
=
act
=
"Committed
#{
invalidate_reference
(
reference
)
}
"
act
=
"Committed
#{
invalidate_reference
(
reference
)
}
"
expect
(
reference_filter
(
act
).
to_html
).
to
match
(
/<a.+>
#{
Regexp
.
escape
(
invalidate_reference
(
reference
))
}
<\/a>/
)
expect
(
reference_filter
(
act
).
to_html
).
to
match
(
/<a.+>
#{
Regexp
.
escape
(
invalidate_reference
(
reference
))
}
<\/a>/
)
end
end
...
...
spec/lib/gitlab/markdown/snippet_reference_filter_spec.rb
View file @
9aac53bc
...
@@ -134,7 +134,7 @@ module Gitlab::Markdown
...
@@ -134,7 +134,7 @@ module Gitlab::Markdown
end
end
it
'ignores invalid snippet IDs on the referenced project'
do
it
'ignores invalid snippet IDs on the referenced project'
do
exp
=
act
=
"See
#{
invalidate_reference
(
reference
)
}
"
act
=
"See
#{
invalidate_reference
(
reference
)
}
"
expect
(
reference_filter
(
act
).
to_html
).
to
match
(
/<a.+>
#{
Regexp
.
escape
(
invalidate_reference
(
reference
))
}
<\/a>/
)
expect
(
reference_filter
(
act
).
to_html
).
to
match
(
/<a.+>
#{
Regexp
.
escape
(
invalidate_reference
(
reference
))
}
<\/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