Module: Jekyll::Converters::Markdown::RedcarpetParser::WithoutPygments

Includes:
CommonMethods
Defined in:
lib/jekyll/converters/markdown/redcarpet_parser.rb

Instance Method Summary collapse

Methods included from CommonMethods

#add_code_tags

Instance Method Details

#block_code(code, lang) ⇒ Object



34
35
36
37
# File 'lib/jekyll/converters/markdown/redcarpet_parser.rb', line 34

def block_code(code, lang)
  lang = lang && lang.split.first || "text"
  output = add_code_tags(code_wrap(code), lang)
end

#code_wrap(code) ⇒ Object



30
31
32
# File 'lib/jekyll/converters/markdown/redcarpet_parser.rb', line 30

def code_wrap(code)
  "<div class=\"highlight\"><pre>#{CGI::escapeHTML(code)}</pre></div>"
end