Skip to main content

render_to_string

Function render_to_string 

Source
pub fn render_to_string(markdown: &str, width: usize) -> String
Expand description

Render a markdown string to a single String with ANSI styling.

This is a stateless convenience function that parses the input, renders each element, and joins with \n. For incremental rendering with terminal cursor control, use Markdown::render or StreamRenderer.

Always uses ThemeMode::Auto and no custom code theme.