Function parse
Source pub fn parse(markup: &str) -> Text
Expand description
Parses markup into rich Text.
Unknown tags are ignored (treated as empty styles). Malformed brackets are
emitted literally, so this never fails on arbitrary input.
ยงExamples
let text = parse("[bold]hi[/] there");
assert_eq!(text.lines[0].spans[0].content, "hi");