Class: Mado::Markdown
- Inherits:
-
Object
- Object
- Mado::Markdown
- Defined in:
- lib/mado/markdown.rb
Defined Under Namespace
Classes: HTML
Class Method Summary collapse
Class Method Details
.convert_markdown(path) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/mado/markdown.rb', line 11 def self.convert_markdown(path) = { filter_html: true, hard_wrap: true } = { autolink: true, fenced_code_blocks: true, lax_spacing: true, no_intra_emphasis: true, strikethrough: true, superscript: true, tables: true } renderer = HTML.new() Redcarpet::Markdown.new(renderer, ).render(open(path).read) end |