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

diff_line_entity.rb « serializers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2119a1017d3d26132a1ade4b341008f64b8b44a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

class DiffLineEntity < Grape::Entity
  expose :line_code
  expose :type
  expose :old_line
  expose :new_line
  expose :text
  expose :meta_positions, as: :meta_data

  expose :rich_text do |line|
    line.rich_text || CGI.escapeHTML(line.text)
  end
end