Flowdock
method

split_paragraphs

Importance_0
Ruby on Rails latest stable (v4.1.8) - 0 notes - Class: ActionView::Helpers::TextHelper
split_paragraphs(text) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionview/lib/action_view/helpers/text_helper.rb, line 421
        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
Register or log in to add new notes.