Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-08-02 11:20:22 +0300
committerFatih Acet <acetfatih@gmail.com>2016-08-12 23:24:46 +0300
commit261d47bce9d7cc80b4c2068cb612411fe51530ee (patch)
tree2f913169220c9e9e6d4e5e1610b085dedbdf864e /lib/gitlab/diff
parent6f3501fe252404b342984514b1b784ffa73edbd0 (diff)
Fix specs
- Add match line header to expected result for `File#sections`. - Lowercase CSS colours. - Remove unused `diff_refs` keyword argument. - Rename `parent` -> `parent_file`, to be more explicit. - Skip an iteration when highlighting.
Diffstat (limited to 'lib/gitlab/diff')
-rw-r--r--lib/gitlab/diff/line.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/diff/line.rb b/lib/gitlab/diff/line.rb
index 38400b48b5c..80a146b4a5a 100644
--- a/lib/gitlab/diff/line.rb
+++ b/lib/gitlab/diff/line.rb
@@ -5,10 +5,10 @@ module Gitlab
attr_writer :rich_text
attr_accessor :text
- def initialize(text, type, index, old_pos, new_pos, parent: nil)
+ def initialize(text, type, index, old_pos, new_pos, parent_file: nil)
@text, @type, @index = text, type, index
@old_pos, @new_pos = old_pos, new_pos
- @parent = parent
+ @parent_file = parent_file
end
def self.init_from_hash(hash)
@@ -46,7 +46,7 @@ module Gitlab
end
def rich_text
- @parent.highlight_lines! if @parent && !@rich_text
+ @parent_file.highlight_lines! if @parent_file && !@rich_text
@rich_text
end