Hwaro::Content::Processors::SyntaxHighlighter
Syntax highlighter module for rendering markdown with highlighting support
Instance methods
default_copy?
Sourcedefault_line_numbers?
Sourcerender(content : String, highlight : Bool = true, safe : Bool = false, *, smart : Bool = false, hooks : Content::Processors::RenderHooks::HookRenderContext | Nil = nil) : String
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.