diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-08 14:17:43 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-08 14:17:43 +0300 |
commit | 1490d65e4541f8fdf4fc8257b0621bdd750dd904 (patch) | |
tree | 2e44f30aa03a5c2ddc04f257b40c8fc60111d178 /lib/gitlab | |
parent | 1f98beba79b16fc0167f8b3396b58d047edade37 (diff) | |
parent | dbffaaa97e7a195dc5421237392788a03a6b763a (diff) |
Merge branch 'blob-load-all-data' into 'master'
Blob#load_all_data! doesn’t need an argument
See merge request !11977
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/blame.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/highlight.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/blame.rb b/lib/gitlab/blame.rb index d62bc50ce78..169aac79854 100644 --- a/lib/gitlab/blame.rb +++ b/lib/gitlab/blame.rb @@ -40,7 +40,7 @@ module Gitlab end def highlighted_lines - @blob.load_all_data!(repository) + @blob.load_all_data! @highlighted_lines ||= Gitlab::Highlight.highlight(@blob.path, @blob.data, repository: repository).lines end diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb index 83bc230df3e..23bc2f63c8e 100644 --- a/lib/gitlab/highlight.rb +++ b/lib/gitlab/highlight.rb @@ -9,7 +9,7 @@ module Gitlab blob = repository.blob_at(ref, file_name) return [] unless blob - blob.load_all_data!(repository) + blob.load_all_data! highlight(file_name, blob.data, repository: repository).lines.map!(&:html_safe) end |