Skip to main content

parse_spans

Function parse_spans 

Source
pub fn parse_spans(body: &str) -> Vec<Span>
Expand description

Parse a message body into styled spans.

A malformed or unterminated colour sequence consumes only what it can validly read and leaves the rest as text, so no byte of the original body is ever dropped.