39ae9a59a5
This replaces the repository param. This allows more flexiblity as sometimes we have highlight content not related to repository. Sometimes we know ahead of time the language of the content. Lastly language determination seems better fit as a logic in the Blob class. `repository` param is only used to determine the language, which seems to be the responsiblity of Blob.
9 lines
295 B
Text
9 lines
295 B
Text
.file-content.code.js-syntax-highlight
|
|
.line-numbers
|
|
- if blob.data.present?
|
|
- blob.data.each_line.each_with_index do |_, index|
|
|
%span.diff-line-num= index + 1
|
|
.blob-content{ data: { blob_id: blob.id } }
|
|
%pre.code.highlight
|
|
%code
|
|
= blob.present.highlight
|