summaryrefslogtreecommitdiff
path: root/lib/gitlab/highlight.rb
diff options
context:
space:
mode:
authorRegis <boudinot.regis@yahoo.com>2017-03-21 09:08:28 -0600
committerRegis <boudinot.regis@yahoo.com>2017-03-21 09:08:28 -0600
commit0b75b821c6cfd173291fcfd88c41da9922d082dd (patch)
tree41b578d299bd77423aa3591955a4cb5ca07ab025 /lib/gitlab/highlight.rb
parent6342da7bb6cbba1b1e026fc62a1da42b811b25f4 (diff)
parenta08c707c928092426e2334423e71c6b841309ddf (diff)
downloadgitlab-ce-0b75b821c6cfd173291fcfd88c41da9922d082dd.tar.gz
update to current master and fix conflictsissue-title-vue
Diffstat (limited to 'lib/gitlab/highlight.rb')
-rw-r--r--lib/gitlab/highlight.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb
index 9360afedfcb..d787d5db4a0 100644
--- a/lib/gitlab/highlight.rb
+++ b/lib/gitlab/highlight.rb
@@ -14,7 +14,7 @@ module Gitlab
end
def initialize(blob_name, blob_content, repository: nil)
- @formatter = Rouge::Formatters::HTMLGitlab.new
+ @formatter = Rouge::Formatters::HTMLGitlab
@repository = repository
@blob_name = blob_name
@blob_content = blob_content
@@ -28,7 +28,7 @@ module Gitlab
hl_lexer = self.lexer
end
- @formatter.format(hl_lexer.lex(text, continue: continue)).html_safe
+ @formatter.format(hl_lexer.lex(text, continue: continue), tag: hl_lexer.tag).html_safe
rescue
@formatter.format(Rouge::Lexers::PlainText.lex(text)).html_safe
end