summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2016-06-21 09:23:42 -0700
committerhttp://jneen.net/ <jneen@jneen.net>2016-06-27 14:17:49 -0700
commite08ff468e826801bbb999186302f4679d8ed5c41 (patch)
tree4bde74c7ea1e8225f6e3d0ee678dbe088bf10b69 /lib
parentc8b52761bc89089f2c3cddc2e4c80eb4ce42ce4c (diff)
downloadgitlab-ce-e08ff468e826801bbb999186302f4679d8ed5c41.tar.gz
make #custom_language private
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/highlight.rb16
1 files 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,