app/helpers/wcc/contentful/app/section_helper.rb in wcc-contentful-app-1.0.7 vs app/helpers/wcc/contentful/app/section_helper.rb in wcc-contentful-app-1.0.8
- old
+ new
@@ -32,11 +32,14 @@
def section_id(section)
title = section.try(:bookmark_title) || section.try(:title)
CGI.escape(title.gsub(/\W+/, '-')) if title.present?
end
- def markdown(text)
- html_to_render = WCC::Contentful::App::MarkdownRenderer.new.markdown(text)
+ def markdown(text, options = {})
+ renderer = WCC::Contentful::App::MarkdownRenderer.new(
+ options
+ )
+ html_to_render = renderer.markdown(text)
content_tag(:div,
CGI.unescapeHTML(html_to_render).html_safe,
class: 'formatted-content')
end