Markdown & highlight

Guide: Markdown & highlighting.

Markdown

ExportSignature
markdown(alloc, ctx, src, MarkdownOptions) !*Node — usually via ctx.markdown(src)
MarkdownOptionsGFM toggle, highlight toggle, base URL

GFM coverage: headings, emphasis, strikethrough, inline code, links (sanitized), images, autolinks, ordered/unordered/nested/task lists, tables, blockquotes, horizontal rules, fenced code (highlighted). Raw HTML is stripped; all text escaped.

Highlight

ExportSignature
highlight(ctx, source, lang) !*Node — span fragment, no <pre>
ctx.codeBlock(source, lang) !*Node<pre><code class="language-…">
HighlightLangknown language tags
detectLangbest-effort language sniffing
highlightThemeCssthe tok-* theme — include via ctx.style(verve.highlightThemeCss)

Unknown language hints fall back to a generic tokenizer; "" renders plain. Token classes are stable tok-* names, themeable with your own CSS instead of the shipped theme.