Open christiangenco opened 10 years ago
I was able to accomplish the same thing by changing the product_description
method of Spree::ProductsHelper
in app/overrides/products_helper.rb
:
Spree::ProductsHelper.class_eval do
def product_description(product)
if Spree::Config[:show_raw_product_description]
raw(product.description)
else
# raw(product.description.gsub(/(.*?)\r?\n\r?\n/m, '<p>\1</p>'))
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :autolink => true, :space_after_headers => true)
markdown.render(product.description).html_safe
end
end
end
ThemeSupport was removed in favor of using deface.