debian-mirror-gitlab/app/views/shared/_file_highlight.html.haml

13 lines
506 B
Text
Raw Normal View History

2015-09-25 12:07:36 +05:30
.file-content.code.js-syntax-highlight{ class: user_color_scheme }
2015-04-26 12:48:37 +05:30
.line-numbers
- if blob.data.present?
2015-09-11 14:41:01 +05:30
- blob.data.lines.each_index do |index|
2015-04-26 12:48:37 +05:30
- offset = defined?(first_line_number) ? first_line_number : 1
- i = index + offset
2015-09-11 14:41:01 +05:30
-# 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}
2015-04-26 12:48:37 +05:30
%i.fa.fa-link
= i
:preserve
#{highlight(blob.name, blob.data)}