moo.shell.window.render_markup_to_ansi
- moo.shell.window.render_markup_to_ansi(markup, quiet=False)
Render a Rich-markup string to an ANSI string.
Mirrors the rendering in
MooPrompt.writer/process_messagesso window output matches the normal scrolling shell.quietstrips colour for accessibility.- Parameters:
markup (
str) – Rich markup (e.g."[bold red]hi[/bold red]")quiet (
bool) – when True, render without colour
- Return type:
str