class ActionView::Template::Handlers::ERB::Erubi

def add_text(text)

def add_text(text)
  return if text.empty?
  if text == "\n"
    @newline_pending += 1
  else
    src << "@output_buffer.safe_append='"
    src << "\n" * @newline_pending if @newline_pending > 0
    src << text.gsub(/['\\]/, '\\\\\&')
    src << "'.freeze;"
    @newline_pending = 0
  end
end