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, **options)
	root = Markly.parse(text, **options)
	
	html = filter.parse(root.to_html).output
	
	return MarkupString.raw(html)
end