aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-03-15 20:08:51 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-03-15 20:08:51 +0000
commit1b41178a836ae84cf62a11ebd6bd640fd0d09566 (patch)
tree134118736e90d9a25ffbe5077ccc0ad5a7ca8b3e /actionpack/lib/action_view
parent3ecde39968bb91182033d7e590879373f697897c (diff)
downloadrails-1b41178a836ae84cf62a11ebd6bd640fd0d09566.tar.gz
rails-1b41178a836ae84cf62a11ebd6bd640fd0d09566.tar.bz2
rails-1b41178a836ae84cf62a11ebd6bd640fd0d09566.zip
Docfix (closes #11230) [Henrik N]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9035 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/text_helper.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb
index 599cd43721..3d479608f3 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -292,18 +292,15 @@ module ActionView
# method does not remove the newlines from the +text+.
#
# ==== Examples
- # my_text = """Here is some basic text...
- # ...with a line break."""
+ # my_text = "Here is some basic text...\n...with a line break."
#
# simple_format(my_text)
- # # => "<p>Here is some basic text...<br />...with a line break.</p>"
+ # # => "<p>Here is some basic text...\n<br />...with a line break.</p>"
#
- # more_text = """We want to put a paragraph...
- #
- # ...right there."""
+ # more_text = "We want to put a paragraph...\n\n...right there."
#
# simple_format(more_text)
- # # => "<p>We want to put a paragraph...</p><p>...right there.</p>"
+ # # => "<p>We want to put a paragraph...</p>\n\n<p>...right there.</p>"
def simple_format(text)
content_tag 'p', text.to_s.
gsub(/\r\n?/, "\n"). # \r\n and \r -> \n