pub fn highlight(value: impl Display, phrase: &str) -> StringExpand description
The text, HTML-escaped, with each match of phrase (case-insensitive) in <mark> (Rails’ highlight).
The result is HTML: the highlight filter marks it safe.
§Examples
assert_eq!(
ocre::helpers::highlight("Rust & rusty <tools>", "rust"),
"<mark>Rust</mark> & <mark>rust</mark>y <tools>"
);