Highlight files based on merged file
This commit is contained in:
parent
66ffa28e65
commit
10cf933f70
1 changed files with 5 additions and 2 deletions
|
@ -59,8 +59,11 @@ module Gitlab
|
|||
end
|
||||
|
||||
def highlight_lines!
|
||||
their_highlight = Gitlab::Highlight.highlight_lines(repository, their_ref, their_path)
|
||||
our_highlight = Gitlab::Highlight.highlight_lines(repository, our_ref, our_path)
|
||||
their_file = lines.reject { |line| line.type == 'new' }.map(&:text).join("\n")
|
||||
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|
|
||||
if line.type == 'old'
|
||||
|
|
Loading…
Reference in a new issue