diff --git a/lib/html/pipeline/syntax_highlight_filter.rb b/lib/html/pipeline/syntax_highlight_filter.rb
index <HASH>..<HASH> 100644
--- a/lib/html/pipeline/syntax_highlight_filter.rb
+++ b/lib/html/pipeline/syntax_highlight_filter.rb
@@ -13,7 +13,7 @@ module HTML
         doc.search('pre').each do |node|
           default = context[:highlight] && context[:highlight].to_s
           next unless lang = node['lang'] || default
-          next unless lexer = get_lexer(lang)
+          next unless lexer = lexer_for(lang)
           text = node.inner_text
 
           html = highlight_with_timeout_handling(lexer, text)
@@ -35,12 +35,8 @@ module HTML
         nil
       end
 
-      def get_lexer(lang)
-        lexer = Linguist::Language[lang] && Linguist::Language[lang].lexer
-        unless lexer
-          lexer = Pygments::Lexer[lang]
-        end
-        lexer
+      def lexer_for(lang)
+        (Linguist::Language[lang] && Linguist::Language[lang].lexer) || Pygments::Lexer[lang]
       end
     end
   end
Simplify and rename get_lexer