Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2016-06-16 00:01:47 +0300
committerhttp://jneen.net/ <jneen@jneen.net>2016-07-14 20:08:15 +0300
commit6107933ba30a2ac6e591971d4a7581a5611c42c0 (patch)
tree5514726caf45d928a9425a5a8287836529fad282 /lib/gitlab/highlight.rb
parente1824aa101a2181fe7e5ce080582cfa188d19da8 (diff)
inline #rouge_formatter
Diffstat (limited to 'lib/gitlab/highlight.rb')
-rw-r--r--lib/gitlab/highlight.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb
index ba157cc98cc..84bd616d608 100644
--- a/lib/gitlab/highlight.rb
+++ b/lib/gitlab/highlight.rb
@@ -13,8 +13,8 @@ module Gitlab
highlight(file_name, blob.data, repository: repository).lines.map!(&:html_safe)
end
- def initialize(blob_name, blob_content, repository: nil)
- @formatter = rouge_formatter
+ def initialize(blob_name, blob_content)
+ @formatter = Rouge::Formatters::HTMLGitlab.new
@repository = repository
@lexer = custom_language || begin
Rouge::Lexer.guess(filename: blob_name, source: blob_content).new
@@ -45,9 +45,5 @@ module Gitlab
Rouge::Lexer.find_fancy(language_name)
end
-
- def rouge_formatter(options = {})
- Rouge::Formatters::HTMLGitlab.new
- end
end
end