diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-06-06 16:21:29 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-06-08 09:39:54 -0500 |
commit | e6e29f9220a676f86ad035ae6430888deab4e8c5 (patch) | |
tree | 3f8ae7e10fcc6175d1046cee9c719f81c29998a5 /lib/gitlab/highlight.rb | |
parent | 1bc80c2587323b9107ec3fb2fe6024d7e7817e35 (diff) | |
download | gitlab-ce-e6e29f9220a676f86ad035ae6430888deab4e8c5.tar.gz |
Use Diff::File blob methods from diff highlighterdm-highlight-diff-file-blob
Diffstat (limited to 'lib/gitlab/highlight.rb')
-rw-r--r-- | lib/gitlab/highlight.rb | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb index 23bc2f63c8e..6b24da030df 100644 --- a/lib/gitlab/highlight.rb +++ b/lib/gitlab/highlight.rb @@ -5,14 +5,6 @@ module Gitlab highlight(blob_content, continue: false, plain: plain) end - def self.highlight_lines(repository, ref, file_name) - blob = repository.blob_at(ref, file_name) - return [] unless blob - - blob.load_all_data! - highlight(file_name, blob.data, repository: repository).lines.map!(&:html_safe) - end - attr_reader :blob_name def initialize(blob_name, blob_content, repository: nil) |