diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-03-03 18:38:44 +0100 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-03-03 18:38:44 +0100 |
commit | 1764e1b7cb2bffb9b4c4a69991fe2c4d21ce5459 (patch) | |
tree | b48ca1bad0532a37a19f00f0903a778109a16a3d /app/views/search | |
parent | e1bc808746523309476913033b104345c06c4816 (diff) | |
download | gitlab-ce-1764e1b7cb2bffb9b4c4a69991fe2c4d21ce5459.tar.gz |
Use Gitlab::Git::DiffCollections
Diffstat (limited to 'app/views/search')
-rw-r--r-- | app/views/search/results/_snippet_blob.html.haml | 2 |
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 6b77d24f50c..c9b7bd154af 100644 --- a/app/views/search/results/_snippet_blob.html.haml +++ b/app/views/search/results/_snippet_blob.html.haml @@ -30,7 +30,7 @@ .line-numbers - snippet_chunks.each do |chunk| - unless chunk[:data].empty? - - chunk[:data].lines.to_a.size.times do |index| + - Gitlab::Git::Util.count_lines(chunk[:data]).times do |index| - offset = defined?(chunk[:start_line]) ? chunk[:start_line] : 1 - i = index + offset = link_to snippet_path+"#L#{i}", id: "L#{i}", rel: "#L#{i}", class: "diff-line-num" do |