twitter/twitter-text-rb — pull request #68 by keitaf (2012-06-01 22:17:46+00:00)
Title: Modify HitHighlighter to work w/o ActiveSupport

HitHighlighter uses String.mb_chars() method in ActiveSupport, so if ActiveSupport is removed from the dependency (as in https://github.com/twitter/twitter-text-rb/pull/67) HitHighlighter won't work correctly for Unicode text on ruby 1.8.

This modifies HitHighlighter to work correctly on Unicode text on ruby 1.8 by using the same technique used in rewriter.rb.