From ac1b896fc0e4eb886aa066051a01b68235ab7c70 Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 2 Dec 2024 23:02:12 +0200 Subject: [PATCH] make highlight function public --- .../tab/item/page/content/text/gemini/reader/syntax.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/browser/window/tab/item/page/content/text/gemini/reader/syntax.rs b/src/app/browser/window/tab/item/page/content/text/gemini/reader/syntax.rs index 57c03010..642c7162 100644 --- a/src/app/browser/window/tab/item/page/content/text/gemini/reader/syntax.rs +++ b/src/app/browser/window/tab/item/page/content/text/gemini/reader/syntax.rs @@ -35,7 +35,11 @@ impl Syntax { Ok(source.to_string()) } - fn highlight(&self, source: &str, syntax_reference: &SyntaxReference) -> Result { + pub fn highlight( + &self, + source: &str, + syntax_reference: &SyntaxReference, + ) -> Result { let ranges = HighlightLines::new(syntax_reference, &self.theme_set.themes[DEFAULT_THEME]) .highlight_line(&source, &self.syntax_set)?;