Method: Rodbot::Refinements#md_to_html

Defined in:
lib/rodbot/refinements.rb

#md_to_htmlString

Converts Markdown in the string to HTML

Examples:

'**important**'.md_to_html   # => '<strong>important</strong>'

Returns:

  • (String)

    HTML

[View source]

69
70
71
72
73
# File 'lib/rodbot/refinements.rb', line 69

refine String do
  def md_to_html
    Kramdown::Document.new(self, input: 'GFM').to_html.strip
  end
end