Title / Description
Code # 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)
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code