Expand description
Console markup parsing.
Port of upstream rich/markup.py. Turns "[bold]Hello[/] [red]World[/]"
into a Text with spans. Tags are resolved against a [Theme] first (so
named styles like [warning] work) and otherwise parsed as inline style
definitions via Style::parse.
A […] is only a tag when it starts with [a-z#/@] (matching upstream’s
RE_TAGS), so [Hello] and [42] are literal text. \[ escapes a bracket,
and an unmatched closing tag raises RichError::Markup.
@-tags (meta/handlers) apply no visible style.