Ruby Test
Ruby
code posted
by
Tester
created at 06 Jan 00:36
Edit
|
Back
1 2 3 4 5 6 7 8 |
# create a custom renderer that allows highlighting of code blocks class HTMLwithPygments < Redcarpet::Render::HTML def block_code(code, language) Pygments.highlight(code, :lexer => language) end end markdown = Redcarpet::Markdown.new(HTMLwithPygments, :fenced_code_blocks => true) |
297 Bytes in 3 ms with coderay