mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
make highlight function public
This commit is contained in:
parent
a0af227e28
commit
ac1b896fc0
@ -35,7 +35,11 @@ impl Syntax {
|
||||
Ok(source.to_string())
|
||||
}
|
||||
|
||||
fn highlight(&self, source: &str, syntax_reference: &SyntaxReference) -> Result<String, Error> {
|
||||
pub fn highlight(
|
||||
&self,
|
||||
source: &str,
|
||||
syntax_reference: &SyntaxReference,
|
||||
) -> Result<String, Error> {
|
||||
let ranges = HighlightLines::new(syntax_reference, &self.theme_set.themes[DEFAULT_THEME])
|
||||
.highlight_line(&source, &self.syntax_set)?;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user