Files
Cagire/crates/markdown/src/highlighter.rs

14 lines
305 B
Rust

use ratatui::style::Style;
pub trait CodeHighlighter {
fn highlight(&self, line: &str) -> Vec<(Style, String)>;
}
pub struct NoHighlight;
impl CodeHighlighter for NoHighlight {
fn highlight(&self, line: &str) -> Vec<(Style, String)> {
vec![(Style::default(), line.to_string())]
}
}