aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2006-04-27 17:38:20 +0000
committerMarcel Molina <marcel@vernix.org>2006-04-27 17:38:20 +0000
commit4d007ce65a950a126590e9bbaca821a356ef9a6f (patch)
tree2a91d199a99e6319a41719ba2780418c9b21e048
parentcd29c33616e1c54721a16bb79cf3d4fbb6d8f931 (diff)
downloadrails-4d007ce65a950a126590e9bbaca821a356ef9a6f.tar.gz
rails-4d007ce65a950a126590e9bbaca821a356ef9a6f.tar.bz2
rails-4d007ce65a950a126590e9bbaca821a356ef9a6f.zip
Fix text_helper.rb documentation rendering. Closes #4725. [Frederick Ros]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4289 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_view/helpers/text_helper.rb40
2 files changed, 22 insertions, 20 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 2494521205..0ee892bb5f 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fix text_helper.rb documentation rendering. Closes #4725. [Frederick Ros]
+
* Fixes bad rendering of JavaScriptMacrosHelper rdoc (closes #4910) [Frederick Ros]
* Allow error_messages_for to report errors for multiple objects, as well as support for customizing the name of the object in the error summary header. Closes #4186. [andrew@redlinesoftware.com, Marcel Molina Jr.]
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb
index 065f785f74..a777c64ecc 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -116,7 +116,7 @@ module ActionView
end
# Returns +text+ transformed into HTML using very simple formatting rules
- # Surrounds paragraphs with <tt>&lt;p&gt;</tt> tags, and converts line breaks into <tt>&lt;br /&gt;</tt>
+ # Surrounds paragraphs with <tt><p></tt> tags, and converts line breaks into <tt><br/></tt>
# Two consecutive newlines(<tt>\n\n</tt>) are considered as a paragraph, one newline (<tt>\n</tt>) is
# considered a linebreak, three or more consecutive newlines are turned into two newlines
def simple_format(text)
@@ -129,7 +129,7 @@ module ActionView
end
# Turns all urls and email addresses into clickable links. The +link+ parameter can limit what should be linked.
- # Options are :all (default), :email_addresses, and :urls.
+ # Options are <tt>:all</tt> (default), <tt>:email_addresses</tt>, and <tt>:urls</tt>.
#
# Example:
# auto_link("Go to http://www.rubyonrails.com and say hello to david@loudthinking.com") =>
@@ -235,28 +235,28 @@ module ActionView
# array every time it is called. This can be used to alternate classes
# for table rows:
#
- # <%- for item in @items do -%>
- # <tr class="<%= cycle("even", "odd") %>">
- # ... use item ...
- # </tr>
- # <%- end -%>
+ # <%- for item in @items do -%>
+ # <tr class="<%= cycle("even", "odd") %>">
+ # ... use item ...
+ # </tr>
+ # <%- end -%>
#
# You can use named cycles to prevent clashes in nested loops. You'll
# have to reset the inner cycle, manually:
#
- # <%- for item in @items do -%>
- # <tr class="<%= cycle("even", "odd", :name => "row_class")
- # <td>
- # <%- for value in item.values do -%>
- # <span style="color:'<%= cycle("red", "green", "blue"
- # :name => "colors") %>'">
- # item
- # </span>
- # <%- end -%>
- # <%- reset_cycle("colors") -%>
- # </td>
- # </tr>
- # <%- end -%>
+ # <%- for item in @items do -%>
+ # <tr class="<%= cycle("even", "odd", :name => "row_class")
+ # <td>
+ # <%- for value in item.values do -%>
+ # <span style="color:'<%= cycle("red", "green", "blue"
+ # :name => "colors") %>'">
+ # item
+ # </span>
+ # <%- end -%>
+ # <%- reset_cycle("colors") -%>
+ # </td>
+ # </tr>
+ # <%- end -%>
def cycle(first_value, *values)
if (values.last.instance_of? Hash)
params = values.pop