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 ec4b798d..2e9c3444 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 @@ -32,12 +32,12 @@ impl Syntax { source_tag: &TextTag, alt: Option<&String>, ) -> Result, Error> { - if let Some(name) = alt { - if let Some(reference) = self.syntax_set.find_syntax_by_name(name) { + if let Some(value) = alt { + if let Some(reference) = self.syntax_set.find_syntax_by_name(value) { return self.syntect_buffer(source_code, source_tag, reference); } - if let Some(reference) = self.syntax_set.find_syntax_by_extension(name) { + if let Some(reference) = self.syntax_set.find_syntax_by_token(value) { return self.syntect_buffer(source_code, source_tag, reference); } }