lib/parliament/utils/helpers/markdown_helper.rb in parliament-utils-0.8.5 vs lib/parliament/utils/helpers/markdown_helper.rb in parliament-utils-0.8.6
- old
+ new
@@ -13,12 +13,14 @@
# @return template [String] Template as HTML
def self.markdown(template)
parliament_renderer = Parliament::Utils::Services::ParliamentMarkdownRenderer
parliament_scrubber = Parliament::Utils::Services::ParliamentMarkdownScrubber.new
- markdown = Redcarpet::Markdown.new(parliament_renderer, tables: true, autolink: true)
- html = markdown.render(ActionController::Base.helpers.sanitize(template, scrubber: parliament_scrubber))
+ markdown = Redcarpet::Markdown.new(parliament_renderer, tables: true, autolink: true, lax_spacing: true)
+
+ html = markdown.render(template)
ActionController::Base.helpers.sanitize(html, scrubber: parliament_scrubber).html_safe
+ html.html_safe
end
end
end
end
end