Class: Marquery::Renderer

Inherits:
Object
  • Object
show all
Includes:
MarkdownToHtml
Defined in:
lib/marquery/renderer.rb

Constant Summary collapse

DEFAULT_OPTIONS =
{
  parse: {smart: true},
  render: {unsafe: true, github_pre_lang: true},
  extension: {
    strikethrough: true,
    table: true,
    autolink: true,
    tagfilter: true,
    tasklist: true,
    footnotes: true
  }
}.freeze

Instance Method Summary collapse

Instance Method Details

#markdown_to_html(content) ⇒ Object



24
25
26
# File 'lib/marquery/renderer.rb', line 24

def markdown_to_html(content)
  Commonmarker.to_html(content.strip, options: DEFAULT_OPTIONS)
end