Commit da154283 authored by Robert Speicher's avatar Robert Speicher

Simplify line numbering

parent 15582293
.file-content.code{class: user_color_scheme_class} .file-content.code{class: user_color_scheme_class}
.line-numbers .line-numbers
- if blob.data.present? - 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 - offset = defined?(first_line_number) ? first_line_number : 1
- i = index + offset - i = index + offset
-# We're not using `link_to` because it is too slow once we get to thousands of lines. -# We're not using `link_to` because it is too slow once we get to thousands of lines.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment