Feat: WIP terse code documentation
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
//! Syntax highlighting trait for fenced code blocks in markdown.
|
||||
|
||||
use ratatui::style::Style;
|
||||
|
||||
/// Produce styled spans from a single line of source code.
|
||||
pub trait CodeHighlighter {
|
||||
fn highlight(&self, line: &str) -> Vec<(Style, String)>;
|
||||
}
|
||||
|
||||
/// Pass-through highlighter that applies no styling.
|
||||
pub struct NoHighlight;
|
||||
|
||||
impl CodeHighlighter for NoHighlight {
|
||||
|
||||
Reference in New Issue
Block a user