Improve markdown support and tweak sponsorship langage
This commit is contained in:
parent
4c28ecf254
commit
2e817d8739
3 changed files with 10 additions and 4 deletions
|
|
@ -1,4 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'redcarpet/render_strip'
|
||||
|
||||
module FormatHelper
|
||||
##
|
||||
|
|
@ -206,6 +207,11 @@ module FormatHelper
|
|||
markdown("#{text} Please look at #{link_to '**Markdown Syntax**', 'https://daringfireball.net/projects/markdown/syntax', target: '_blank'} to format your text", false)
|
||||
end
|
||||
|
||||
# Return a plain text markdown stripped of formatting.
|
||||
def plain_text(content)
|
||||
Redcarpet::Markdown.new(Redcarpet::Render::StripDown).render(content)
|
||||
end
|
||||
|
||||
def quantity_left_of(resource)
|
||||
return '-/-' if resource.quantity.blank?
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue