Module: How::SyntaxHighlighter
- Defined in:
- lib/how/syntax_highlighter.rb
Overview
This module contains methods to handle syntax highlighting.
Class Method Summary collapse
-
.get_pygments_lexer(syntax) ⇒ String?
Retrieves the Pygments lexer corresponding to the supplied syntax type.
Class Method Details
.get_pygments_lexer(syntax) ⇒ String?
Retrieves the Pygments lexer corresponding to the supplied syntax type.
9 10 11 12 13 14 15 16 |
# File 'lib/how/syntax_highlighter.rb', line 9 def self.get_pygments_lexer(syntax) case syntax.downcase when 'rb', 'ruby' 'rb' when 'js', 'javascript' 'js' end end |