Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module MD
- def renderer
- Redcarpet::Render::HTML.new(
- :no_intra_emphasis => true,
- :tables => true,
- :fenced_code_blocks => true,
- :disable_indented_code_blocks => true,
- :autolink => true,
- :filter_html => false,
- :with_toc_data => true
- )
- end
- def markdown
- Redcarpet::Markdown.new(renderer)
- end
- def md
- markdown.render(yield)
- end
- end
- helpers MD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement