Skip to content
Snippets Groups Projects
Commit 10cf933f authored by Sean McGivern's avatar Sean McGivern Committed by Fatih Acet
Browse files

Highlight files based on merged file

parent 66ffa28e
No related branches found
No related tags found
No related merge requests found
Loading
@@ -59,8 +59,11 @@ module Gitlab
Loading
@@ -59,8 +59,11 @@ module Gitlab
end end
   
def highlight_lines! def highlight_lines!
their_highlight = Gitlab::Highlight.highlight_lines(repository, their_ref, their_path) their_file = lines.reject { |line| line.type == 'new' }.map(&:text).join("\n")
our_highlight = Gitlab::Highlight.highlight_lines(repository, our_ref, our_path) our_file = lines.reject { |line| line.type == 'old' }.map(&:text).join("\n")
their_highlight = Gitlab::Highlight.highlight(their_path, their_file, repository: repository).lines.map(&:html_safe)
our_highlight = Gitlab::Highlight.highlight(our_path, our_file, repository: repository).lines.map(&:html_safe)
   
lines.each do |line| lines.each do |line|
if line.type == 'old' if line.type == 'old'
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment