diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-29 11:00:29 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-29 11:00:29 +0400 |
commit | c51ac0484f37b65b31cd83b816b151fc7d50cf05 (patch) | |
tree | 1be6c9788fc16f65340bed60f97579c2f9a805ee /app/models | |
parent | 3083753c395722827385cf7542099cf6b4b60c4d (diff) | |
parent | d859d080942175082c1a0cf34d89c0eefd1a3c39 (diff) |
Merge pull request #5962 from skv-headless/editing-preview
editing preview
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/note.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 6f7afcd1f9f..cee10ec90d2 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -184,9 +184,10 @@ class Note < ActiveRecord::Base return @diff_line if @diff_line if diff - Gitlab::DiffParser.new(diff).each do |full_line, type, line_code, line_new, line_old| - @diff_line = full_line if line_code == self.line_code - end + Gitlab::DiffParser.new(diff.diff.lines.to_a, diff.new_path) + .each do |full_line, type, line_code, line_new, line_old| + @diff_line = full_line if line_code == self.line_code + end end @diff_line |