diff options
-rw-r--r-- | lib/gitlab/highlight.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb index a9e429a29f4..9360afedfcb 100644 --- a/lib/gitlab/highlight.rb +++ b/lib/gitlab/highlight.rb @@ -35,8 +35,8 @@ module Gitlab def lexer @lexer ||= custom_language || begin - Rouge::Lexer.guess(filename: blob_name, source: blob_content).new - rescue Rouge::Lexer::AmbiguousGuess => e + Rouge::Lexer.guess(filename: @blob_name, source: @blob_content).new + rescue Rouge::Guesser::Ambiguous => e e.alternatives.sort_by(&:tag).first end end |