From 89ee3ff54eba0c23bbe1ce6deb40092185fdfb01 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Mon, 11 Nov 2013 16:06:23 +0000 Subject: Highlighter is now an option. Passing it as an argument is deprecated. --- app/helpers/application_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/helpers/application_helper.rb') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e3b1e57ac..99322c65f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -54,9 +54,9 @@ 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, '\1').html_safe + highlight(h(t), words, :highlighter => '\1').html_safe else - highlight(t, words, '*\1*') + highlight(t, words, :highlighter => '*\1*') end end -- cgit v1.2.3 From 06a728f978254ec702d33971d9398e5c42c551a7 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Mon, 11 Nov 2013 16:07:44 +0000 Subject: In excerpt, radius is now an option. Passing it as an argument is deprecated. --- app/helpers/application_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/helpers/application_helper.rb') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 99322c65f..6d0a111e9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -61,9 +61,9 @@ module ApplicationHelper 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) -- cgit v1.2.3