How to ignore case in highlight() function?

how to ignore case in highlight() function?

Joao S. wrote:

how to ignore case in highlight() function?

Rails uses /i on when creating the Regexp for matching in the highlight
method, this makes the regular expression ignore case. So it seems it
already behaves as you want.

http://github.com/rails/rails/blob/a147becfb86b689ab25e92edcfbb4bcc04108099/actionpack/lib/action_view/helpers/text_helper.rb#L110

Best,
Michael G.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs