BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
7edc1439
Commit
7edc1439
authored
Oct 01, 2014
by
Vinnie Okada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ReferenceExtractor
The cross-project reference feature broke the ReferenceExtractor class; this fixes it.
parent
1b1ba6b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
markdown.rb
lib/gitlab/markdown.rb
+5
-3
reference_extractor.rb
lib/gitlab/reference_extractor.rb
+1
-1
No files found.
lib/gitlab/markdown.rb
View file @
7edc1439
...
...
@@ -146,13 +146,15 @@ module Gitlab
end
# Called from #parse_references. Attempts to build a gitlab reference
# link. Returns nil if either +type+ or +project+ are nil, if the match
# string is an HTML entity, or if the reference is invalid.
# link. Returns nil if +type+ is nil, if the match string is an HTML
# entity, if the reference is invalid, or if the matched text includes an
# invalid project path.
def
parse_result
(
match_info
,
type
,
project
,
project_prefix
)
prefix
=
match_info
[
:prefix
]
suffix
=
match_info
[
:suffix
]
return
nil
if
html_entity?
(
prefix
,
suffix
)
||
project
.
nil?
||
type
.
nil?
return
nil
if
html_entity?
(
prefix
,
suffix
)
||
type
.
nil?
return
nil
if
project
.
nil?
&&
!
project_prefix
.
nil?
identifier
=
match_info
[
type
]
ref_link
=
reference_link
(
type
,
identifier
,
project
,
project_prefix
)
...
...
lib/gitlab/reference_extractor.rb
View file @
7edc1439
...
...
@@ -51,7 +51,7 @@ module Gitlab
private
def
reference_link
(
type
,
identifier
,
project
)
def
reference_link
(
type
,
identifier
,
_
,
_
)
# Append identifier to the appropriate collection.
send
(
"
#{
type
}
s"
)
<<
identifier
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