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
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2016-02-01 13:33:36 +0300
committerJacob Vosmaer <contact@jacobvosmaer.nl>2016-02-01 13:33:36 +0300
commit2679ec40667958aa01c8480978b13a5727cac231 (patch)
treec139ea7f3723c7f19de4b2bb9ff4cb1fb9133a1c /app/views/shared/_file_highlight.html.haml
parent02afa6793cca042f8563b0e26472606c743d76f5 (diff)
parentda8e0f86595299740a344309cb5963854b61c4a6 (diff)
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into git-raw-workhorse
Diffstat (limited to 'app/views/shared/_file_highlight.html.haml')
-rw-r--r--app/views/shared/_file_highlight.html.haml7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/views/shared/_file_highlight.html.haml b/app/views/shared/_file_highlight.html.haml
index 331bad3ccf7..57856031d6e 100644
--- a/app/views/shared/_file_highlight.html.haml
+++ b/app/views/shared/_file_highlight.html.haml
@@ -1,13 +1,12 @@
-.file-content.code.js-syntax-highlight{ class: user_color_scheme }
+.file-content.code.js-syntax-highlight
.line-numbers
- if blob.data.present?
- 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{href: "#L#{i}", id: "L#{i}", 'data-line-number' => i}
+ %a.diff-line-num{href: "#L#{i}", id: "L#{i}", 'data-line-number' => i}
%i.fa.fa-link
= i
.blob-content{data: {blob_id: blob.id}}
- :preserve
- #{highlight(blob.name, blob.data)}
+ = highlight(blob.name, blob.data)