diff options
Diffstat (limited to 'app/serializers/suggestion_entity.rb')
-rw-r--r-- | app/serializers/suggestion_entity.rb | 4 |
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) |