Module: Jekyll::Converters::Markdown::RedcarpetParser::CommonMethods
- Included in:
- WithPygments, WithoutHighlighting
- Defined in:
- lib/jekyll/converters/markdown/redcarpet_parser.rb
Instance Method Summary collapse
Instance Method Details
#add_code_tags(code, lang) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/jekyll/converters/markdown/redcarpet_parser.rb', line 6 def (code, lang) code = code.to_s code = code.sub(/<pre>/, "<pre><code class=\"language-#{lang}\" data-lang=\"#{lang}\">") code = code.sub(/<\/pre>/, "</code></pre>") code end |