module

Hwaro::Content::Processors::SyntaxHighlighter

Syntax highlighter module for rendering markdown with highlighting support

Instance methods

body_fingerprint

Fingerprint of module-level state that changes rendered body HTML.

Source
default_copy=(value : Bool)
Source
default_copy?
Source
default_line_numbers=(value : Bool)
Source
default_line_numbers?
Source
render(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.

Source
server_mode=(value : Bool)
Source