diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-07-29 15:44:04 +0200 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-07-29 15:44:04 +0200 |
commit | 05b518aa4d5a690ab90f7026b3684659c9d51fa9 (patch) | |
tree | d34d37bcbe77cf73007d1d272e05c7ca94113f07 /app/helpers/blob_helper.rb | |
parent | 097a8952d0991b42752a84aedd472aa8291717cf (diff) | |
parent | 8bda433734394af7e3858c0804b378a6d1313a84 (diff) | |
download | gitlab-ce-05b518aa4d5a690ab90f7026b3684659c9d51fa9.tar.gz |
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into backup-archive-permissions
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r-- | app/helpers/blob_helper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb index 50df3801703..77d99140c43 100644 --- a/app/helpers/blob_helper.rb +++ b/app/helpers/blob_helper.rb @@ -1,6 +1,6 @@ module BlobHelper def highlight(blob_name, blob_content, nowrap: false, continue: false) - @formatter ||= Rugments::Formatters::HTML.new( + @formatter ||= Rouge::Formatters::HTMLGitlab.new( nowrap: nowrap, cssclass: 'code highlight', lineanchors: true, @@ -8,11 +8,11 @@ module BlobHelper ) begin - @lexer ||= Rugments::Lexer.guess(filename: blob_name, source: blob_content).new + @lexer ||= Rouge::Lexer.guess(filename: blob_name, source: blob_content).new result = @formatter.format(@lexer.lex(blob_content, continue: continue)).html_safe rescue - lexer = Rugments::Lexers::PlainText - result = @formatter.format(lexer.lex(blob_content)).html_safe + @lexer = Rouge::Lexers::PlainText + result = @formatter.format(@lexer.lex(blob_content)).html_safe end result |