Module: XRB::Formatters::Markdown

Defined in:
lib/xrb/formatters/markdown.rb

Instance Method Summary collapse

Instance Method Details

#markdown(text, filter = XRB::Sanitize::Fragment, **options) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/xrb/formatters/markdown.rb', line 14

def markdown(text, filter = XRB::Sanitize::Fragment, **options)
	root = Markly.parse(text, **options)
	
	html = filter.parse(root.to_html).output
	
	return MarkupString.raw(html)
end