--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Highlights one or more <tt>phrases</tt> everywhere in <tt>text</tt> by inserting it into a <tt>:highlighter</tt> string. The highlighter can be specialized by passing <tt>:highlighter</tt> as a single-quoted string with \1 where the phrase is to be inserted (defaults to '&lt;strong class=&quot;highlight&quot;&gt;\1&lt;/strong&gt;')
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Examples
- !ruby/struct:SM::Flow::VERB 
  body: "  highlight('You searched for: rails', 'rails')\n  # =&gt; You searched for: &lt;strong class=&quot;highlight&quot;&gt;rails&lt;/strong&gt;\n\n  highlight('You searched for: ruby, rails, dhh', 'actionpack')\n  # =&gt; You searched for: ruby, rails, dhh\n\n  highlight('You searched for: rails', ['for', 'rails'], :highlighter =&gt; '<em>\\1</em>')\n  # =&gt; You searched <em>for</em>: <em>rails</em>\n\n  highlight('You searched for: rails', 'rails', :highlighter =&gt; '&lt;a href=&quot;search?q=\\1&quot;&gt;\\1&lt;/a&gt;')\n  # =&gt; You searched for: &lt;a href=&quot;search?q=rails&quot;&gt;rails&lt;/a&gt;\n"
- !ruby/struct:SM::Flow::P 
  body: "You can still use <tt>highlight</tt> with the old API that accepts the <tt>highlighter</tt> as its optional third parameter:"
- !ruby/struct:SM::Flow::VERB 
  body: "  highlight('You searched for: rails', 'rails', '&lt;a href=&quot;search?q=\\1&quot;&gt;\\1&lt;/a&gt;')     # =&gt; You searched for: &lt;a href=&quot;search?q=rails&quot;&gt;rails&lt;/a&gt;\n"
full_name: ActionView::Helpers::TextHelper#highlight
is_singleton: false
name: highlight
params: (text, phrases, *args)
visibility: public
