diff options
author | Derek Prior <derekprior@gmail.com> | 2016-06-27 16:44:00 -0400 |
---|---|---|
committer | Derek Prior <derekprior@gmail.com> | 2016-06-27 16:47:24 -0400 |
commit | a1398d11f7167ddcfbcc5c45649fd75958e4f516 (patch) | |
tree | 7defb4d28300f1721c610bda531548b59ad54225 /actionview | |
parent | 5ce304af9691371129d7a0c03e0e32c06f242c5e (diff) | |
download | rails-a1398d11f7167ddcfbcc5c45649fd75958e4f516.tar.gz rails-a1398d11f7167ddcfbcc5c45649fd75958e4f516.tar.bz2 rails-a1398d11f7167ddcfbcc5c45649fd75958e4f516.zip |
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]
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/helpers/text_helper.rb | 9 |
1 files changed, 5 insertions, 4 deletions
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(<tt>\n\n</tt>) are considered as a - # paragraph and wrapped in <tt><p></tt> tags. One newline (<tt>\n</tt>) is - # considered as a linebreak and a <tt><br /></tt> tag is appended. This - # method does not remove the newlines from the +text+. + # Two or more consecutive newlines(<tt>\n\n</tt> or <tt>\r\n\r\n</tt>) are + # considered a paragraph and wrapped in <tt><p></tt> tags. One newline + # (<tt>\n</tt> or <tt>\r\n</tt>) is considered a linebreak and a + # <tt><br /></tt> tag is appended. This method does not remove the + # newlines from the +text+. # # You can pass any HTML attributes into <tt>html_options</tt>. These # will be added to all created paragraphs. |