diff options
author | barthc <mackintosh02@gmail.com> | 2016-06-23 12:44:50 +0100 |
---|---|---|
committer | barthc <mackintosh02@gmail.com> | 2016-06-23 12:44:50 +0100 |
commit | 9b49c466f2ad5f54de441160e625a874220aea28 (patch) | |
tree | 69ed687dea7b14e72c46304529e05df144cb8633 /app/views/shared | |
parent | 6f4498484390592c1f65d4e9f269b94678e227c6 (diff) | |
download | gitlab-ce-9b49c466f2ad5f54de441160e625a874220aea28.tar.gz |
renamed path to link
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/_file_highlight.html.haml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/shared/_file_highlight.html.haml b/app/views/shared/_file_highlight.html.haml index d9e9078cc1e..ad944a19ca1 100644 --- a/app/views/shared/_file_highlight.html.haml +++ b/app/views/shared/_file_highlight.html.haml @@ -2,12 +2,12 @@ .line-numbers - if blob.data.present? - link_icon = icon('link') - - path = blob_path if defined?(blob_path) + - link = blob_link if defined?(blob_link) - blob.data.each_line.each_with_index do |_, index| - offset = defined?(first_line_number) ? first_line_number : 1 - i = index + offset -# We're not using `link_to` because it is too slow once we get to thousands of lines. - %a.diff-line-num{href: "#{path}#L#{i}", id: "L#{i}", 'data-line-number' => i} + %a.diff-line-num{href: "#{link}#L#{i}", id: "L#{i}", 'data-line-number' => i} = link_icon = i .blob-content{data: {blob_id: blob.id}} |