Commit d833c957 authored by Stan Hu's avatar Stan Hu

Merge branch 'dblessing_bump_rouge' into 'master'

Update Rouge syntax highlighting gem to 3.26.1

See merge request gitlab-org/gitlab!70738
parents 4cbb308f 879628c8
......@@ -165,7 +165,7 @@ gem 'asciidoctor', '~> 2.0.10'
gem 'asciidoctor-include-ext', '~> 0.3.1', require: false
gem 'asciidoctor-plantuml', '~> 0.0.12'
gem 'asciidoctor-kroki', '~> 0.5.0', require: false
gem 'rouge', '~> 3.26.0'
gem 'rouge', '~> 3.26.1'
gem 'truncato', '~> 0.7.11'
gem 'bootstrap_form', '~> 4.2.0'
gem 'nokogiri', '~> 1.11.4'
......
......@@ -1051,7 +1051,7 @@ GEM
rexml (3.2.5)
rinku (2.0.0)
rotp (6.2.0)
rouge (3.26.0)
rouge (3.26.1)
rqrcode (0.7.0)
chunky_png
rqrcode-rails3 (0.1.7)
......@@ -1592,7 +1592,7 @@ DEPENDENCIES
responders (~> 3.0)
retriable (~> 3.1.2)
rexml (~> 3.2.5)
rouge (~> 3.26.0)
rouge (~> 3.26.1)
rqrcode-rails3 (~> 0.1.7)
rspec-parameterized
rspec-rails (~> 5.0.1)
......
......@@ -70,7 +70,7 @@ module Gitlab
end
def highlight_plain(text)
@formatter.format(Rouge::Lexers::PlainText.lex(text), context).html_safe
@formatter.format(Rouge::Lexers::PlainText.lex(text), **context).html_safe
end
def highlight_rich(text, continue: true)
......@@ -78,7 +78,7 @@ module Gitlab
tag = lexer.tag
tokens = lexer.lex(text, continue: continue)
Timeout.timeout(timeout_time) { @formatter.format(tokens, context.merge(tag: tag)).html_safe }
Timeout.timeout(timeout_time) { @formatter.format(tokens, **context, tag: tag).html_safe }
rescue Timeout::Error => e
add_highlight_timeout_metric
......
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