Module: Bunto::Converters::Markdown::RedcarpetParser::WithoutHighlighting

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

Instance Method Summary collapse

Methods included from CommonMethods

#add_code_tags

Instance Method Details

#block_code(code, lang) ⇒ Object



41
42
43
44
# File 'lib/bunto/converters/markdown/redcarpet_parser.rb', line 41

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

#code_wrap(code) ⇒ Object



37
38
39
# File 'lib/bunto/converters/markdown/redcarpet_parser.rb', line 37

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