Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-06-16 00:32:37 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-06-19 11:31:24 +0300
commitda15428340e94e1c99c60e6e6f794d4c25d8e0a2 (patch)
treef60e976a8b5887146e1015f6486da21d13bf5bfb /app
parent15582293b9e602f5352a6fe88afd9934c9447dad (diff)
Simplify line numbering
Diffstat (limited to 'app')
-rw-r--r--app/views/shared/_file_highlight.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/shared/_file_highlight.html.haml b/app/views/shared/_file_highlight.html.haml
index ab70f4770bc..d6a2e177da1 100644
--- a/app/views/shared/_file_highlight.html.haml
+++ b/app/views/shared/_file_highlight.html.haml
@@ -1,7 +1,7 @@
.file-content.code{class: user_color_scheme_class}
.line-numbers
- if blob.data.present?
- - blob.data.lines.to_a.size.times do |index|
+ - blob.data.lines.each_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.