Hwaro::Content::Processors::SyntaxHighlighter
Syntax highlighter module for rendering markdown with highlighting support
Constants
List of supported languages for highlight.js (common ones)
Get CSS themes available for highlight.js
Instance methods
Check if content has code blocks that might benefit from highlighting
Render markdown to HTML with syntax highlighting enabled
@param content - markdown content to render
@param highlight - whether to enable syntax highlighting for code blocks
@param safe - if true, raw HTML will not be passed through (replaced by comments)
@param smart - if true, markd's smart punctuation rewrites straight
quotes/dashes/ellipses in Text nodes (code spans, raw HTML, and the
\x00 placeholders the extension passes leave are untouched)
@param hooks - render-hook context (nil when no templates/hooks/render-*
template is configured); when nil the renderer construction below is
byte-identical to the pre-hooks code path.