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
db8f70d5
Commit
db8f70d5
authored
Mar 21, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not rewrite reference if already a cross reference
parent
91963267
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
reference_rewriter.rb
lib/gitlab/gfm/reference_rewriter.rb
+4
-2
No files found.
lib/gitlab/gfm/reference_rewriter.rb
View file @
db8f70d5
...
...
@@ -49,12 +49,14 @@ module Gitlab
def
unfold_reference
(
reference
,
match
,
target_project
)
before
=
@text
[
0
...
match
.
begin
(
0
)]
after
=
@text
[
match
.
end
(
0
)
..-
1
]
referable
=
find_referable
(
reference
)
referable
=
find_referable
(
reference
)
return
reference
unless
referable
cross_reference
=
referable
.
to_reference
(
target_project
)
new_text
=
before
+
cross_reference
+
after
return
reference
if
reference
==
cross_reference
new_text
=
before
+
cross_reference
+
after
substitution_valid?
(
new_text
)
?
cross_reference
:
reference
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