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 dd266295..ec4b798d 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 @@ -33,6 +33,10 @@ impl Syntax { alt: Option<&String>, ) -> Result, Error> { if let Some(name) = alt { + if let Some(reference) = self.syntax_set.find_syntax_by_name(name) { + return self.syntect_buffer(source_code, source_tag, reference); + } + if let Some(reference) = self.syntax_set.find_syntax_by_extension(name) { return self.syntect_buffer(source_code, source_tag, reference); }