Class: ContentFS::Renderers::Markdown::Code::SyntaxRenderer Private
- Inherits:
-
CommonMarker::HtmlRenderer
- Object
- CommonMarker::HtmlRenderer
- ContentFS::Renderers::Markdown::Code::SyntaxRenderer
- Defined in:
- lib/contentfs/renderers/markdown/code.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #code_block(node) ⇒ Object private
Instance Method Details
#code_block(node) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 26 27 28 29 30 |
# File 'lib/contentfs/renderers/markdown/code.rb', line 23 def code_block(node) block do language = node.fence_info.split(/\s+/)[0] out("<div class=\"highlight\"><pre class=\"highlight #{language}\"><code>") out(syntax_highlight(node.string_content, language)) out('</code></pre></div>') end end |