Inquire Stylesheet for changing background color of specific letter?


I am using the inquire crate, specifically Text for accepting text from the user.

Let's say hypothetically I want to make all the letter "a" characters of the prompt text have teal background... I can see Text has a RenderConfig field which has a "prompt" Stylesheet, but a "Stylesheet" in this case is just this simple struct...

pub struct StyleSheet {
    pub fg: Option<Color>,
    pub bg: Option<Color>,
    pub att: Attributes,

How can I incorporate fancy logic in my stylesheet for only making letter "a" characters the special color?


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.