Commit 41d05fa8 authored by Phil Hughes's avatar Phil Hughes

Fixed alignment of snippet search results

Also enabled syntaax highlight on the search results

Closes #26832
parent f802ad37
......@@ -12,9 +12,9 @@
%span.light= time_ago_with_tooltip(snippet.created_at)
%h4.snippet-title
- snippet_path = reliable_snippet_path(snippet)
= link_to snippet_path do
.file-holder
.js-file-title.file-title
= link_to snippet_path do
%i.fa.fa-file
%strong= snippet.file_name
- if markup?(snippet.file_name)
......@@ -36,17 +36,10 @@
= link_to snippet_path+"#L#{i}", id: "L#{i}", rel: "#L#{i}", class: "diff-line-num" do
%i.fa.fa-link
= i
- unless snippet == snippet_chunks.last
%a.diff-line-num
= "."
%pre.code
%code
.blob-content
- snippet_chunks.each do |chunk|
- unless chunk[:data].empty?
= chunk[:data]
- unless chunk == snippet_chunks.last
%a
= "..."
= highlight(snippet.file_name, chunk[:data], repository: nil, plain: snippet.no_highlighting?)
- else
.file-content.code
.nothing-here-block Empty file
---
title: Fix snippets search result spacing
merge_request:
author:
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