pub fn apply_highlight(
spans: &[Span],
ranges: &[(usize, usize)],
highlight_style: Style,
) -> Vec<Span>Expand description
Apply highlighting to spans using grapheme-index ranges.
Ranges are expressed as half-open intervals (start, end) in grapheme
indices over the concatenated plain text (spans_plain_text).
Highlighting is applied by overlaying the provided highlight_style onto
the base span style:
fg/bgfields fromhighlight_stylereplace the base fields when they areSome.dim,bold,italic,underline,blink,inverse, andstrikeare ORed with the base flags.
Invalid ranges (where start >= end) are ignored.