Module: Trenni::Formatters::Markdown
- Defined in:
- lib/trenni/formatters/markdown.rb
Instance Method Summary collapse
Instance Method Details
#markdown(text, filter = Trenni::Sanitize::Fragment, **options) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/trenni/formatters/markdown.rb', line 31 def markdown(text, filter = Trenni::Sanitize::Fragment, **) root = Markly.parse(text, **) html = filter.parse(root.to_html).output return MarkupString.raw(html) end |