diff --git a/lib/foodsoft_wiki/app/helpers/pages_helper.rb b/lib/foodsoft_wiki/app/helpers/pages_helper.rb index 1f7605e5..6f93837e 100644 --- a/lib/foodsoft_wiki/app/helpers/pages_helper.rb +++ b/lib/foodsoft_wiki/app/helpers/pages_helper.rb @@ -6,8 +6,11 @@ module PagesHelper end def wikified_body(body, title = nil) - render_opts = {:locale => I18n.locale} # workaround for wikicloth 0.8.0 https://github.com/nricciar/wikicloth/pull/59 - WikiCloth.new({:data => body+"\n", :link_handler => Wikilink.new, :params => {:referer => title}}).to_html(render_opts).html_safe + WikiCloth.new(:data => body+"\n", + :link_handler => Wikilink.new, + :params => {:referer => title}) + .to_html(wikicloth_render_options) + .html_safe rescue => e "#{t('.wikicloth_exception', :msg => e)}".html_safe # try the following with line breaks: === one === == two == = three = end @@ -44,11 +47,12 @@ module PagesHelper toc << "*" * number + " #{name}\n" end - logger.debug toc.inspect - unless toc.blank? - toc = WikiCloth.new({:data => toc, :link_handler => Wikilink.new}).to_html - toc.gsub(/