summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRubén Dávila <rdavila84@gmail.com>2015-12-30 18:42:11 -0500
committerRubén Dávila <rdavila84@gmail.com>2015-12-30 18:42:11 -0500
commit7de90f4b53f865dc417d022a9133372e57274549 (patch)
tree71d5b8aa6ca6356d9e8591d0d223dca5a973511e /lib
parentb74f36c9caae38a1d62c18281d8240ec5905c5d8 (diff)
downloadgitlab-ce-7de90f4b53f865dc417d022a9133372e57274549.tar.gz
Fix broken spec and small refactor. #3945
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/diff/highlight.rb2
-rw-r--r--lib/gitlab/diff/line.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/diff/highlight.rb b/lib/gitlab/diff/highlight.rb
index adb437abed2..d0c2e3670c6 100644
--- a/lib/gitlab/diff/highlight.rb
+++ b/lib/gitlab/diff/highlight.rb
@@ -25,7 +25,7 @@ module Gitlab
def update_diff_lines
@highlighted_code.lines.each_with_index do |line, i|
- @diff_lines[i].highlighted_text = "#{@diff_line_prefixes[i]}#{line}"
+ @diff_lines[i].text = "#{@diff_line_prefixes[i]}#{line}"
end
@diff_lines
diff --git a/lib/gitlab/diff/line.rb b/lib/gitlab/diff/line.rb
index c48c69fb344..03730b435ad 100644
--- a/lib/gitlab/diff/line.rb
+++ b/lib/gitlab/diff/line.rb
@@ -1,8 +1,8 @@
module Gitlab
module Diff
class Line
- attr_reader :type, :text, :index, :old_pos, :new_pos
- attr_accessor :highlighted_text
+ attr_reader :type, :index, :old_pos, :new_pos
+ attr_accessor :text
def initialize(text, type, index, old_pos, new_pos)
@text, @type, @index = text, type, index