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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-24 12:07:44 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-24 12:07:44 +0300
commit6593f1f627938f22090dec5221476772d3ed581d (patch)
treeac5b9adf00f24f1d7cbc59c7d78f7c4fd06a0001 /app/serializers/suggestion_entity.rb
parent2f369bd95866b7f623387ce2b6acf646df3d5222 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers/suggestion_entity.rb')
-rw-r--r--app/serializers/suggestion_entity.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/serializers/suggestion_entity.rb b/app/serializers/suggestion_entity.rb
index 2dd62e19e29..4fb19fbc074 100644
--- a/app/serializers/suggestion_entity.rb
+++ b/app/serializers/suggestion_entity.rb
@@ -4,7 +4,9 @@ class SuggestionEntity < API::Entities::Suggestion
include RequestAwareEntity
unexpose :from_line, :to_line, :from_content, :to_content
- expose :diff_lines, using: DiffLineEntity
+ expose :diff_lines, using: DiffLineEntity do |suggestion|
+ Gitlab::Diff::Highlight.new(suggestion.diff_lines).highlight
+ end
expose :current_user do
expose :can_apply do |suggestion|
Ability.allowed?(current_user, :apply_suggestion, suggestion)