BigW Consortium Gitlab

_file_highlight.html.haml 506 Bytes
Newer Older
1
.file-content.code.js-syntax-highlight{ class: user_color_scheme }
2
  .line-numbers
Dmitriy Zaporozhets committed
3
    - if blob.data.present?
4
      - blob.data.lines.each_index do |index|
Dmitriy Zaporozhets committed
5 6
        - offset = defined?(first_line_number) ? first_line_number : 1
        - i = index + offset
7 8
        -# 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}
9
          %i.fa.fa-link
Dmitriy Zaporozhets committed
10
          = i
11 12
  :preserve
    #{highlight(blob.name, blob.data)}