diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-21 19:02:23 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 09:31:57 -0600 |
commit | 8a4d68c53e9c58ad7f8dce1494f7976292b2f929 (patch) | |
tree | 773814f7079c626cafabc229f929cafbe4d4b2e7 /lib/gitlab/conflict/file.rb | |
parent | 7ea641b6d0882fc782a7eb493daf8b66d076924b (diff) | |
download | gitlab-ce-8a4d68c53e9c58ad7f8dce1494f7976292b2f929.tar.gz |
Enable Style/ConditionalAssignment
Diffstat (limited to 'lib/gitlab/conflict/file.rb')
-rw-r--r-- | lib/gitlab/conflict/file.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/conflict/file.rb b/lib/gitlab/conflict/file.rb index c843315782d..fd43a224b3d 100644 --- a/lib/gitlab/conflict/file.rb +++ b/lib/gitlab/conflict/file.rb @@ -91,10 +91,10 @@ module Gitlab our_highlight = Gitlab::Highlight.highlight(our_path, our_file, repository: repository).lines lines.each do |line| - if line.type == 'old' - line.rich_text = their_highlight[line.old_line - 1].try(:html_safe) + line.rich_text = if line.type == 'old' + their_highlight[line.old_line - 1].try(:html_safe) else - line.rich_text = our_highlight[line.new_line - 1].try(:html_safe) + our_highlight[line.new_line - 1].try(:html_safe) end end end |