module ActionView::Helpers::TextHelper

def split_paragraphs(text)

def split_paragraphs(text)
  return [] if text.blank?
  text.to_str.gsub(/\r\n?/, "\n").split(/\n\n+/).map! do |t|
    t.gsub!(/([^\n]\n)(?=[^\n])/, '\1<br />') || t
  end
end