Module: Tzispa::Helpers::Text
- Defined in:
- lib/tzispa/experts/text.rb
Instance Method Summary collapse
Instance Method Details
#mime_formatter(text, mime) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/tzispa/experts/text.rb', line 7 def mime_formatter(text, mime) case mime when 'text/x-markdown' Redcarpet::Markdown.new(Redcarpet::Render::HTML.new).render(text) if text else text end end |