Module: MarkdownHelper
- Defined in:
- app/helpers/markdown_helper.rb
Defined Under Namespace
Classes: HTMLWithPygments
Instance Method Summary collapse
Instance Method Details
#markdown(text) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/helpers/markdown_helper.rb', line 13 def markdown(text) renderer = HTMLWithPygments.new(hard_wrap: true, filter_html: true) = { autolink: true, no_intra_emphasis: true, fenced_code_blocks: true, lax_html_blocks: true, strikethrough: true, superscript: true } Redcarpet::Markdown.new(renderer, ).render(text).html_safe end |