Skip to content

nimterm/markdown

This page is generated from the module’s exported API and ## documentation comments.

Minimal markdown-to-ANSI renderer.

Stateless by design, so callers can re-render accumulated streaming text. Supports the subset that shows up regularly in coding-agent replies: headings, fenced code blocks, inline code, bold, italic, links, lists, blockquotes, horizontal rules, and tables.

Render a markdown response to a string with optional ANSI colors.

proc renderMarkdown(text: string; useColor: bool; maxWidth = 0): string {.
raises: [], tags: [], forbids: [].}

Returns: string.

Name Type Default
text string
useColor bool
maxWidth inferred 0

View source