2c3e42e4a4
Instead of rendering this value server-side, we use Javascript and Gon to apply the user's color scheme (or the default) to any syntax highlighted code blocks. This will make it easier to cache these blocks in the future because they're no longer state-dependent.
10 lines
428 B
Text
10 lines
428 B
Text
- blob = @project.repository.parse_search_result(blob)
|
|
.blob-result
|
|
.file-holder
|
|
.file-title
|
|
= link_to namespace_project_blob_path(@project.namespace, @project, tree_join(blob.ref, blob.filename), :anchor => "L" + blob.startline.to_s) do
|
|
%i.fa.fa-file
|
|
%strong
|
|
= blob.filename
|
|
.file-content.code.term
|
|
= render 'shared/file_highlight', blob: blob, first_line_number: blob.startline
|