Less line feeds at the markdown output

This commit is contained in:
echarp 2017-06-04 14:59:31 +02:00
parent 83bcde3101
commit 9dfdeeaea0

View File

@ -61,7 +61,11 @@ module EventsHelper
tags: %w[p br h1 h2 h3 h4 table tr th td ul ol li a strong
b em i sub sup],
attributes: %w[href]
Kramdown::Document.new(desc, input: :html, line_width: line_width)
result = Kramdown::Document.new(desc, input: :html, line_width: line_width)
.to_kramdown
# Remove extraneous line feeds
result.gsub(/\n\n+/, '
').tr('\w\\', '').html_safe
end
end