remove trailing white-spaces from app/helpers/search_helper.rb.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6885 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-08-31 11:10:57 +00:00
parent 698fc53c94
commit 54daad8af5
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ module SearchHelper
def highlight_tokens(text, tokens) def highlight_tokens(text, tokens)
return text unless text && tokens && !tokens.empty? return text unless text && tokens && !tokens.empty?
re_tokens = tokens.collect {|t| Regexp.escape(t)} re_tokens = tokens.collect {|t| Regexp.escape(t)}
regexp = Regexp.new "(#{re_tokens.join('|')})", Regexp::IGNORECASE regexp = Regexp.new "(#{re_tokens.join('|')})", Regexp::IGNORECASE
result = '' result = ''
text.split(regexp).each_with_index do |words, i| text.split(regexp).each_with_index do |words, i|
if result.length > 1200 if result.length > 1200