summaryrefslogtreecommitdiff
path: root/app/views/search/results
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2018-09-06 12:34:25 +0800
committerMark Chao <mchao@gitlab.com>2018-10-30 15:44:55 +0800
commit39ae9a59a59615092fbef189466f37c34f4a7fb1 (patch)
treec8611265f8fb290cbce92f04cadb593b531165ee /app/views/search/results
parent32f9cf8ce3dd337bf3b1683c5872171c253f0d27 (diff)
downloadgitlab-ce-39ae9a59a59615092fbef189466f37c34f4a7fb1.tar.gz
Make Highlight accept language param
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.
Diffstat (limited to 'app/views/search/results')
-rw-r--r--app/views/search/results/_snippet_blob.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/search/results/_snippet_blob.html.haml b/app/views/search/results/_snippet_blob.html.haml
index 8b95bdf9747..92ea6f281f4 100644
--- a/app/views/search/results/_snippet_blob.html.haml
+++ b/app/views/search/results/_snippet_blob.html.haml
@@ -39,7 +39,7 @@
.blob-content
- snippet_chunks.each do |chunk|
- unless chunk[:data].empty?
- = highlight(snippet.file_name, chunk[:data], repository: nil, plain: snippet.blob.no_highlighting?)
+ = highlight(snippet.file_name, chunk[:data], plain: snippet.blob.no_highlighting?)
- else
.file-content.code
.nothing-here-block Empty file