Commit 6107933b authored by http://jneen.net/'s avatar http://jneen.net/

inline #rouge_formatter

parent e1824aa1
...@@ -13,8 +13,8 @@ module Gitlab ...@@ -13,8 +13,8 @@ module Gitlab
highlight(file_name, blob.data, repository: repository).lines.map!(&:html_safe) highlight(file_name, blob.data, repository: repository).lines.map!(&:html_safe)
end end
def initialize(blob_name, blob_content, repository: nil) def initialize(blob_name, blob_content)
@formatter = rouge_formatter @formatter = Rouge::Formatters::HTMLGitlab.new
@repository = repository @repository = repository
@lexer = custom_language || begin @lexer = custom_language || begin
Rouge::Lexer.guess(filename: blob_name, source: blob_content).new Rouge::Lexer.guess(filename: blob_name, source: blob_content).new
...@@ -45,9 +45,5 @@ module Gitlab ...@@ -45,9 +45,5 @@ module Gitlab
Rouge::Lexer.find_fancy(language_name) Rouge::Lexer.find_fancy(language_name)
end end
def rouge_formatter(options = {})
Rouge::Formatters::HTMLGitlab.new
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment