git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6885 e93f8b46-1217-0410-a6f0-8f06a7374b81tags/1.3.0
@@ -19,7 +19,7 @@ module SearchHelper | |||
def highlight_tokens(text, tokens) | |||
return text unless text && tokens && !tokens.empty? | |||
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 = '' | |||
text.split(regexp).each_with_index do |words, i| | |||
if result.length > 1200 |