Last active
December 24, 2015 08:59
-
-
Save lozandier/6774412 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
class CustomRender < Redcarpet::Render::HTML | |
include Redcarpet::Render::SmartyPants | |
def block_code(code, language) | |
Pygments.highlight(code, lexer: language) | |
end | |
end | |
def markdown | |
@markdown ||= Redcarpet::Markdown.new CustomRender, { | |
autolink: true, | |
fenced_code: true, | |
generate_toc: true, | |
gh_blockcode: true, | |
hard_wrap: true, | |
no_intraemphasis: true, | |
strikethrough: true, | |
tables: true, | |
superscript: true | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment