Created
April 30, 2014 08:02
-
-
Save anonymous/752547b5c480391893aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in app/helpers/application_helper.rb | |
module ApplicationHelper | |
def md(text) | |
kramdown_doc = Kramdown::Document.new(text, parse_block_html: true, auto_id_stripping: true, | |
coderay_tab_width: 2).to_remove_html_tags(remove_span_html_tags: true) | |
Kramdown::Converter::Html.convert(kramdown_doc).join.html_safe | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment