diff options
author | http://jneen.net/ <jneen@jneen.net> | 2016-06-21 09:23:42 -0700 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2016-06-27 14:17:49 -0700 |
commit | e08ff468e826801bbb999186302f4679d8ed5c41 (patch) | |
tree | 4bde74c7ea1e8225f6e3d0ee678dbe088bf10b69 /lib | |
parent | c8b52761bc89089f2c3cddc2e4c80eb4ce42ce4c (diff) | |
download | gitlab-ce-e08ff468e826801bbb999186302f4679d8ed5c41.tar.gz |
make #custom_language private
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/highlight.rb | 16 |
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, |