diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-01-24 11:24:55 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-01-24 11:24:55 +0000 |
commit | 63586e47e1b53bca023fdbba83bff2cd138feaf3 (patch) | |
tree | 5c9ed659c968f092317de6bab59a712e2584ca66 /app/helpers/application_helper.rb | |
parent | 80e66c0fba234fc78f13d5e7635f65d2bc25fe58 (diff) | |
parent | b0a939a4d44077b4602176042ff4432b790561ad (diff) |
Merge branch 'release/0.16' into wdtk
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0c346ab4e..4b603b064 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -54,16 +54,16 @@ module ApplicationHelper # Highlight words, also escapes HTML (other than spans that we add) def highlight_words(t, words, html = true) if html - highlight(h(t), words, '<span class="highlight">\1</span>').html_safe + highlight(h(t), words, :highlighter => '<span class="highlight">\1</span>').html_safe else - highlight(t, words, '*\1*') + highlight(t, words, :highlighter => '*\1*') end end def highlight_and_excerpt(t, words, excount, html = true) - newt = excerpt(t, words[0], excount) + newt = excerpt(t, words[0], :radius => excount) if not newt - newt = excerpt(t, '', excount) + newt = excerpt(t, '', :radius => excount) end t = newt t = highlight_words(t, words, html) |