From e08ff468e826801bbb999186302f4679d8ed5c41 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Tue, 21 Jun 2016 09:23:42 -0700 Subject: [PATCH] make #custom_language private --- lib/gitlab/highlight.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb index 36ab622fff6..7f8cfe706de 100644 --- a/lib/gitlab/highlight.rb +++ b/lib/gitlab/highlight.rb @@ -27,14 +27,6 @@ module Gitlab end end - def custom_language - return nil if @repository.nil? - - language_name = @repository.gitattribute(@blob_name, 'gitlab-language') - - Rouge::Lexer.find(language_name) - end - def highlight(text, continue: true, plain: false) if plain @formatter.format(Rouge::Lexers::PlainText.lex(text)).html_safe @@ -47,6 +39,14 @@ module Gitlab private + def custom_language + return nil if @repository.nil? + + language_name = @repository.gitattribute(@blob_name, 'gitlab-language') + + Rouge::Lexer.find(language_name) + end + def rouge_formatter(options = {}) options = options.reverse_merge( nowrap: true,