Feat: continue refactoring
This commit is contained in:
13
crates/markdown/src/highlighter.rs
Normal file
13
crates/markdown/src/highlighter.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
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())]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user