Skip to main content

Module markdown

Module markdown 

Source
Expand description

Markdown rendering utilities for terminal output with syntax highlighting support.

Structs§

HighlightedSegment
A highlighted line segment with style and text.
MarkdownLine
A rendered line composed of styled segments.
MarkdownSegment
A styled text segment.
RenderMarkdownOptions

Functions§

highlight_code_to_ansi
Highlight a code string and return ANSI-formatted strings per line.
highlight_code_to_segments
Highlight a code string and return styled segments per line.
highlight_line_for_diff
Highlight a single line of code for diff preview. Returns a vector of (style, text) segments, or None if highlighting fails.
render_markdown
Convenience helper that renders markdown using the active theme without emitting output.
render_markdown_to_lines
Render markdown text to styled lines that can be written to the terminal renderer.
render_markdown_to_lines_with_options