use owo_colors::Style;
use crate::SpanContents;
use super::{Highlighter, HighlighterState};
#[derive(Debug, Clone)]
pub struct BlankHighlighter;
impl Highlighter for BlankHighlighter {
fn start_highlighter_state<'h>(
&'h self,
_source: &dyn SpanContents<'_>,
) -> Box<dyn super::HighlighterState + 'h> {
Box::new(BlankHighlighterState)
}
}
impl Default for BlankHighlighter {
fn default() -> Self {
BlankHighlighter
}
}
#[derive(Debug, Clone)]
pub struct BlankHighlighterState;
impl HighlighterState for BlankHighlighterState {
fn highlight_line<'s>(&mut self, line: &'s str) -> Vec<owo_colors::Styled<&'s str>> {
vec![Style::default().style(line)]
}
}