Skip to main content

Module markdown

Module markdown 

Source
Expand description

Markdown parsing and rendering for terminal display

This module provides markdown-to-styled-text conversion for popups, hover documentation, and other UI elements. It also provides word wrapping utilities for styled text.

Structs§

StyledLine
A line of styled spans for markdown rendering
StyledSpan
A styled span for markdown rendering

Functions§

parse_markdown
Parse markdown text into styled lines for terminal rendering
wrap_styled_lines
Word-wrap styled lines to fit within a given width. Breaks at word boundaries (spaces) when possible, preserving styling. Continuation lines are indented to match the original line’s leading whitespace.
wrap_text_line
Word-wrap a single line of text to fit within a given width. Breaks at word boundaries (spaces) when possible. Falls back to character-based breaking for words longer than max_width. Continuation lines are indented to match the original line’s leading whitespace.
wrap_text_lines
Word-wrap a vector of text lines to fit within a given width.