@@ -41,9 +41,10 @@ module TextHelper
41
41
include OutputSafetyHelper
42
42
43
43
# The preferred method of outputting text in your views is to use the
44
- # <%= "text" %> eRuby syntax. The regular _puts_ and _print_ methods
44
+ # <tt>< %= "text" %></tt> eRuby syntax. The regular +puts+ and +print+ methods
45
45
# do not operate as expected in an eRuby code block. If you absolutely must
46
- # output text within a non-output code block (i.e., <% %>), you can use the concat method.
46
+ # output text within a non-output code block (i.e., <tt><% %></tt>), you
47
+ # can use the +concat+ method.
47
48
#
48
49
# <%
49
50
# concat "hello"
@@ -110,7 +111,7 @@ def truncate(text, options = {}, &block)
110
111
# Highlights one or more +phrases+ everywhere in +text+ by inserting it into
111
112
# a <tt>:highlighter</tt> string. The highlighter can be specialized by passing <tt>:highlighter</tt>
112
113
# as a single-quoted string with <tt>\1</tt> where the phrase is to be inserted (defaults to
113
- # <tt><mark>\1</mark></tt>) or passing a block that receives each matched term. By default +text+
114
+ # <tt>" <mark>\1</mark>" </tt>) or passing a block that receives each matched term. By default +text+
114
115
# is sanitized to prevent possible XSS attacks. If the input is trustworthy, passing false
115
116
# for <tt>:sanitize</tt> will turn sanitizing off.
116
117
#
@@ -215,7 +216,7 @@ def excerpt(text, phrase, options = {})
215
216
# Attempts to pluralize the +singular+ word unless +count+ is 1. If
216
217
# +plural+ is supplied, it will use that when count is > 1, otherwise
217
218
# it will use the Inflector to determine the plural form for the given locale,
218
- # which defaults to I18n.locale
219
+ # which defaults to + I18n.locale+.
219
220
#
220
221
# The word will be pluralized using rules defined for the locale
221
222
# (you must define your own inflection rules for languages other than English).
@@ -336,7 +337,7 @@ def simple_format(text, html_options = {}, options = {})
336
337
end
337
338
end
338
339
339
- # Creates a Cycle object whose _to_s_ method cycles through elements of an
340
+ # Creates a Cycle object whose +to_s+ method cycles through elements of an
340
341
# array every time it is called. This can be used for example, to alternate
341
342
# classes for table rows. You can use named cycles to allow nesting in loops.
342
343
# Passing a Hash as the last parameter with a <tt>:name</tt> key will create a
0 commit comments