Class: Decidim::DecidimAwesome::ContentRenderers::MarkdownRenderer

Inherits:
ContentRenderers::BaseRenderer
  • Object
show all
Defined in:
lib/decidim/decidim_awesome/content_renderers/markdown_renderer.rb

Overview

A renderer that processes markdown

Instance Method Summary collapse

Instance Method Details

#render(options = { filter_html: true, autolink: true, no_intra_emphasis: true, fenced_code_blocks: true, disable_indented_code_blocks: true, tables: true }) ⇒ String



11
12
13
14
# File 'lib/decidim/decidim_awesome/content_renderers/markdown_renderer.rb', line 11

def render(options = { filter_html: true, autolink: true, no_intra_emphasis: true, fenced_code_blocks: true, disable_indented_code_blocks: true, tables: true })
  md = Redcarpet::Markdown.new(Redcarpet::Render::HTML, options).render(content)
  "<div class=\"awesome-markdown-editor\">#{md}</div>"
end