inline #rouge_formatter
This commit is contained in:
parent
e1824aa101
commit
6107933ba3
1 changed files with 2 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue