Commit 89ab7e79 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Highlight code search results

parent 3fafac3e
......@@ -6,5 +6,4 @@
%strong
= blob.filename
.file-content.code.term
%div{class: user_color_scheme_class}
= raw blob.colorize( formatter: :gitlab, options: { first_line_number: blob.startline } )
= render 'shared/file_hljs', blob: blob, first_line_number: blob.startline
%div.highlighted-data{class: user_color_scheme_class}
.line-numbers
- blob.data.lines.size.times do |index|
- i = index + 1
- offset = defined?(first_line_number) ? first_line_number : 1
- i = index + offset
= link_to "#L#{i}", id: "L#{i}", rel: "#L#{i}" do
%i.icon-link
= i
......
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