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