Class: Markabb::Highlighters::Coderay
- Inherits:
-
SyntaxHighlighter
- Object
- SyntaxHighlighter
- Markabb::Highlighters::Coderay
- Defined in:
- lib/markabb/highlighters/coderay.rb
Overview
Markabb Syntax Highlighter for CodeRay
See http://coderay.rubychan.de/ for CodeRay
Instance Method Summary collapse
-
#parse(lang, s) ⇒ Object
Takes the language and string as an option and passes config from Markabb for coderay.
Methods inherited from SyntaxHighlighter
Constructor Details
This class inherits a constructor from Markabb::SyntaxHighlighter
Instance Method Details
#parse(lang, s) ⇒ Object
Takes the language and string as an option and passes config from Markabb for coderay
See coderay.rubychan.de/ for CodeRays configuration options
10 11 12 |
# File 'lib/markabb/highlighters/coderay.rb', line 10 def parse(lang, s) "[nobbc]" + ::CodeRay.scan(s, lang).div(Markabb.config.) + "[/nobbc]" end |