Methods

Files

Jekyll::Converters::Markdown::RedcarpetParser::WithPygments

Public Instance Methods

block_code(code, lang) click to toggle source
# File lib/jekyll/converters/markdown/redcarpet_parser.rb, line 15
def block_code(code, lang)
  require 'pygments'
  lang = lang && lang.split.first || "text"
  output = add_code_tags(
    Pygments.highlight(code, :lexer => lang, :options => { :encoding => 'utf-8' }),
    lang
  )
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.