diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-04 00:09:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-04 00:09:24 +0300 |
commit | 9432ed811233643af1cb5ad78e2cd9755ed989a9 (patch) | |
tree | a6f4d254ebd818a58017b3bfb0911f4aae169fcf /app/views/search | |
parent | 44434461b3c58336624125b5ab002e7200e4a208 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/search')
-rw-r--r-- | app/views/search/results/_blob_highlight.html.haml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/search/results/_blob_highlight.html.haml b/app/views/search/results/_blob_highlight.html.haml index 7ba114496af..1b84883b34b 100644 --- a/app/views/search/results/_blob_highlight.html.haml +++ b/app/views/search/results/_blob_highlight.html.haml @@ -4,7 +4,9 @@ #search-blob-content.file-content.code.js-syntax-highlight{ class: 'gl-py-3!' } - if blob.present? .blob-content{ data: { blob_id: blob.id, path: blob.path, highlight_line: highlight, qa_selector: 'file_content' } } - - blob.present.highlight.lines.each_with_index do |line, index| + - blob_highlight = blob.present.highlight_and_trim(trim_length: 1024, ellipsis_svg: sprite_icon('ellipsis_h', size: 12, css_class: "gl-text-gray-700")) if Feature.enabled?(:truncate_long_blobs_in_search, current_user) + - blob_highlight ||= blob.present.highlight + - blob_highlight.lines.each_with_index do |line, index| - i = index + offset .line_holder.code-search-line.gl-display-flex .line-numbers |