Browse Source

The markdown generator turns titles into strong elements

remotes/origin/master
echarp 3 years ago
parent
commit
2360047872
  1. 2
      app/helpers/events_helper.rb

2
app/helpers/events_helper.rb

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

Loading…
Cancel
Save