2018-08-16 14:53:33 -04:00
|
|
|
# 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|
|
2018-10-01 12:44:30 -04:00
|
|
|
ERB::Util.html_escape(line.rich_text || line.text)
|
2018-08-16 14:53:33 -04:00
|
|
|
end
|
|
|
|
end
|