def render_diff_data(data)
      content_tag(:div, class: "card card--list diff diff-#{data[:type]}") do
        if [:i18n, :i18n_html].include?(data[:type])
          render_diff_value(
            "&nbsp;",
            data[:type],
            nil,
            data: {
              old_value: data[:old_value].to_s.gsub("</p>", "</p>\n"),
              new_value: data[:new_value].to_s.gsub("</p>", "</p>\n")
            }
          )
        else
          render_diff_value(data[:old_value], data[:type], :removal) +
            render_diff_value(data[:new_value], data[:type], :addition)
        end
      end
    end
def render_diff_data(data)
      content_tag(:div, class: "card card--list diff diff-#{data[:type]}") do
        if [:i18n, :i18n_html].include?(data[:type])
          render_diff_value(
            "&nbsp;",
            data[:type],
            nil,
            data: {
              old_value: data[:old_value].to_s.gsub("</p>", "</p>\n"),
              new_value: data[:new_value].to_s.gsub("</p>", "</p>\n")
            }
          )
        else
          render_diff_value(data[:old_value], data[:type], :removal) +
            render_diff_value(data[:new_value], data[:type], :addition)
        end
      end
    end
Renders the diff between `:old_data` and `:new_data` keys in the `data` param.

 data - A Hash with `old_data`, `:new_data` and `:type` keys.

 Returns an HTML-safe string.