Module: Jekyll::Converters::Markdown::RedcarpetParser::WithoutHighlighting

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



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

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

#code_wrap(code) ⇒ Object



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

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