The markdown generator turns titles into strong elements

This commit is contained in:
echarp 2019-05-11 17:30:30 +02:00
parent 36d37ccbc9
commit 2360047872

View File

@ -64,7 +64,7 @@ module EventsHelper
attributes: %w[href] attributes: %w[href]
Kramdown::Document.new(spaces(desc), input: :html, line_width: line_width) Kramdown::Document.new(spaces(desc), input: :html, line_width: line_width)
.to_kramdown .to_kramdown
.gsub(/^#+ (.*)/, '### \1') .gsub(/^#+\s+(.*)/, '**\1**')
.gsub(/\\([\"'])/, '\1') # Remove slash before quotes .gsub(/\\([\"'])/, '\1') # Remove slash before quotes
.remove(/[[:blank:]]+$/) # Remove extraneous spaces .remove(/[[:blank:]]+$/) # Remove extraneous spaces
.remove(/{::}/) # Markdown artefact .remove(/{::}/) # Markdown artefact