Markdown & highlight
Guide: Markdown & highlighting.
Markdown
| Export | Signature |
|---|---|
markdown | (alloc, ctx, src, MarkdownOptions) !*Node — usually via ctx.markdown(src) |
MarkdownOptions | GFM 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
| Export | Signature |
|---|---|
highlight | (ctx, source, lang) !*Node — span fragment, no <pre> |
ctx.codeBlock | (source, lang) !*Node — <pre><code class="language-…"> |
HighlightLang | known language tags |
detectLang | best-effort language sniffing |
highlightThemeCss | the 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.