Flowdock
highlight(text, phrase, highlighter = '\1') public

Highlights phrase everywhere it is found in text by inserting it into a highlighter string. The highlighter can be specialized by passing highlighter as a single-quoted string with \1 where the phrase is to be inserted.

  highlight('You searched for: rails', 'rails')
   => You searched for: <strong class="highlight">rails</strong>
Show source
Register or log in to add new notes.