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
e63eccf9
Commit
e63eccf9
authored
Aug 01, 2016
by
winniehell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not look up commit again when it is passed to RelativeLinkFilter (!5455)
parent
4dd1f955
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/banzai/filter/relative_link_filter.rb
lib/banzai/filter/relative_link_filter.rb
+3
-3
No files found.
lib/banzai/filter/relative_link_filter.rb
View file @
e63eccf9
...
@@ -51,7 +51,7 @@ module Banzai
...
@@ -51,7 +51,7 @@ module Banzai
relative_url_root
,
relative_url_root
,
context
[
:project
].
path_with_namespace
,
context
[
:project
].
path_with_namespace
,
uri_type
(
file_path
),
uri_type
(
file_path
),
ref
||
context
[
:project
].
default_branch
,
# if no ref exists, point to the default branch
ref
,
file_path
file_path
].
compact
.
join
(
'/'
).
squeeze
(
'/'
).
chomp
(
'/'
)
].
compact
.
join
(
'/'
).
squeeze
(
'/'
).
chomp
(
'/'
)
...
@@ -115,7 +115,7 @@ module Banzai
...
@@ -115,7 +115,7 @@ module Banzai
end
end
def
current_commit
def
current_commit
@current_commit
||=
context
[
:commit
]
||
re
f
?
repository
.
commit
(
ref
)
:
repository
.
head_commit
@current_commit
||=
context
[
:commit
]
||
re
pository
.
commit
(
ref
)
end
end
def
relative_url_root
def
relative_url_root
...
@@ -123,7 +123,7 @@ module Banzai
...
@@ -123,7 +123,7 @@ module Banzai
end
end
def
ref
def
ref
context
[
:ref
]
context
[
:ref
]
||
context
[
:project
].
default_branch
end
end
def
repository
def
repository
...
...
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