diff options
author | http://jneen.net/ <jneen@jneen.net> | 2016-06-22 22:53:58 +0300 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2016-06-28 00:17:49 +0300 |
commit | 66b37149eb72179e1b6329221b8a92e226e4e563 (patch) | |
tree | 1f1b9e12320bf54301964f0bc8f11b2970a9ea47 /lib | |
parent | e7b512efa65aebe26cd0240a4d077475c42761c1 (diff) |
support cgi style options, such as erb?parent=json
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/highlight.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb index 7f8cfe706de..41296415e35 100644 --- a/lib/gitlab/highlight.rb +++ b/lib/gitlab/highlight.rb @@ -40,11 +40,11 @@ module Gitlab private def custom_language - return nil if @repository.nil? + language_name = @repository && @repository.gitattribute(@blob_name, 'gitlab-language') - language_name = @repository.gitattribute(@blob_name, 'gitlab-language') + return nil unless language_name - Rouge::Lexer.find(language_name) + Rouge::Lexer.find_fancy(language_name) end def rouge_formatter(options = {}) |