diff options
author | http://jneen.net/ <jneen@jneen.net> | 2016-06-15 14:01:47 -0700 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2016-07-14 10:08:15 -0700 |
commit | 6107933ba30a2ac6e591971d4a7581a5611c42c0 (patch) | |
tree | 5514726caf45d928a9425a5a8287836529fad282 /lib | |
parent | e1824aa101a2181fe7e5ce080582cfa188d19da8 (diff) | |
download | gitlab-ce-6107933ba30a2ac6e591971d4a7581a5611c42c0.tar.gz |
inline #rouge_formatter
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/highlight.rb | 8 |
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 |