pub fn highlight_formula(
text: &str,
font: FontId,
error: Option<Range<usize>>,
) -> LayoutJobExpand description
Build a highlighted [LayoutJob] for text, coloring tokens per
scan/color_for. If error is Some(start..end), those bytes
(clamped to the text and to char boundaries; a span may cover part of a
token or several) are rendered in ERROR_COLOR with a 2 px underline so
the error’s location is visible inline. crate::diagnostics places it:
the token at a parse error’s position, or the name a compile error names.