From a1398d11f7167ddcfbcc5c45649fd75958e4f516 Mon Sep 17 00:00:00 2001 From: Derek Prior Date: Mon, 27 Jun 2016 16:44:00 -0400 Subject: Document `simple_format` handling of `\r` `simple_format` handles `\r\n` and `\r` but previously did not document this behavior. The handling is done with a `gsub` in `split_paragraphs`. [ci skip] --- actionview/lib/action_view/helpers/text_helper.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'actionview/lib/action_view/helpers') diff --git a/actionview/lib/action_view/helpers/text_helper.rb b/actionview/lib/action_view/helpers/text_helper.rb index 58ce042f12..fe365fafe1 100644 --- a/actionview/lib/action_view/helpers/text_helper.rb +++ b/actionview/lib/action_view/helpers/text_helper.rb @@ -269,10 +269,11 @@ module ActionView end # Returns +text+ transformed into HTML using simple formatting rules. - # Two or more consecutive newlines(\n\n) are considered as a - # paragraph and wrapped in

tags. One newline (\n) is - # considered as a linebreak and a
tag is appended. This - # method does not remove the newlines from the +text+. + # Two or more consecutive newlines(\n\n or \r\n\r\n) are + # considered a paragraph and wrapped in

tags. One newline + # (\n or \r\n) is considered a linebreak and a + #
tag is appended. This method does not remove the + # newlines from the +text+. # # You can pass any HTML attributes into html_options. These # will be added to all created paragraphs. -- cgit v1.2.3