Function rustc_errors::markdown::parse::expand_plaintext
source · fn expand_plaintext<'a>(
txt: &'a str,
stream: &mut Vec<MdTree<'a>>,
f: fn(_: &'a str) -> MdTree<'a>
)
Expand description
Perform tranformations to text. This splits paragraphs, replaces patterns, and corrects newlines.
To avoid allocating strings (and using a different heavier tt type), our
replace method means split into three and append each. For this reason, any
viewer should treat consecutive PlainText
types as belonging to the same
paragraph.