From 6107933ba30a2ac6e591971d4a7581a5611c42c0 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Wed, 15 Jun 2016 14:01:47 -0700 Subject: inline #rouge_formatter --- lib/gitlab/highlight.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib') 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 -- cgit v1.2.1