summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2019-06-18 10:03:13 +0000
committerDouwe Maan <douwe@gitlab.com>2019-06-18 10:03:13 +0000
commitc167cc58d3efe2bf1d8f9ccb1a58d7819fef1901 (patch)
tree306264d047406840bd6f0a6561d2c47a9931eda8
parent28fe2a67d00938ac504fb1838ed4c42931880c2e (diff)
parentaebee1882d25498bfcb97472c8ace69cc691aeca (diff)
downloadgitlab-ce-c167cc58d3efe2bf1d8f9ccb1a58d7819fef1901.tar.gz
Merge branch 'asciidoctor-upgrade' into 'master'
Upgrade asciidoctor version to 2.0.10 and change method names in html5_converter Closes #63304 See merge request gitlab-org/gitlab-ce!29741
-rw-r--r--Gemfile4
-rw-r--r--Gemfile.lock10
-rw-r--r--changelogs/unreleased/asciidoctor-upgrade.yml5
-rw-r--r--lib/gitlab/asciidoc/html5_converter.rb9
4 files changed, 15 insertions, 13 deletions
diff --git a/Gemfile b/Gemfile
index c9a95fb7a36..b9ce2422153 100644
--- a/Gemfile
+++ b/Gemfile
@@ -129,9 +129,9 @@ gem 'rdoc', '~> 6.0'
gem 'org-ruby', '~> 0.9.12'
gem 'creole', '~> 0.5.0'
gem 'wikicloth', '0.8.1'
-gem 'asciidoctor', '~> 1.5.8'
+gem 'asciidoctor', '~> 2.0.10'
gem 'asciidoctor-include-ext', '~> 0.3.1', require: false
-gem 'asciidoctor-plantuml', '0.0.8'
+gem 'asciidoctor-plantuml', '0.0.9'
gem 'rouge', '~> 3.1'
gem 'truncato', '~> 0.7.11'
gem 'bootstrap_form', '~> 4.2.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index 4cebf73f17a..b03bd58eacc 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -66,11 +66,11 @@ GEM
faraday_middleware (~> 0.9)
faraday_middleware-multi_json (~> 0.0)
oauth2 (~> 1.0)
- asciidoctor (1.5.8)
+ asciidoctor (2.0.10)
asciidoctor-include-ext (0.3.1)
asciidoctor (>= 1.5.6, < 3.0.0)
- asciidoctor-plantuml (0.0.8)
- asciidoctor (~> 1.5)
+ asciidoctor-plantuml (0.0.9)
+ asciidoctor (>= 1.5.6, < 3.0.0)
ast (2.4.0)
atomic (1.1.99)
attr_encrypted (3.1.0)
@@ -1025,9 +1025,9 @@ DEPENDENCIES
akismet (~> 2.0)
apollo_upload_server (~> 2.0.0.beta3)
asana (~> 0.8.1)
- asciidoctor (~> 1.5.8)
+ asciidoctor (~> 2.0.10)
asciidoctor-include-ext (~> 0.3.1)
- asciidoctor-plantuml (= 0.0.8)
+ asciidoctor-plantuml (= 0.0.9)
attr_encrypted (~> 3.1.0)
awesome_print
babosa (~> 1.0.2)
diff --git a/changelogs/unreleased/asciidoctor-upgrade.yml b/changelogs/unreleased/asciidoctor-upgrade.yml
new file mode 100644
index 00000000000..50a7cb21e7d
--- /dev/null
+++ b/changelogs/unreleased/asciidoctor-upgrade.yml
@@ -0,0 +1,5 @@
+---
+title: Upgrade asciidoctor version to 2.0.10
+merge_request: 29741
+author: Rajendra Kadam
+type: added
diff --git a/lib/gitlab/asciidoc/html5_converter.rb b/lib/gitlab/asciidoc/html5_converter.rb
index 2c5c74e4789..e5163e1954c 100644
--- a/lib/gitlab/asciidoc/html5_converter.rb
+++ b/lib/gitlab/asciidoc/html5_converter.rb
@@ -1,22 +1,19 @@
# frozen_string_literal: true
require 'asciidoctor'
-require 'asciidoctor/converter/html5'
module Gitlab
module Asciidoc
- class Html5Converter < Asciidoctor::Converter::Html5Converter
- extend Asciidoctor::Converter::Config
-
+ class Html5Converter < (Asciidoctor::Converter.for 'html5')
register_for 'gitlab_html5'
- def stem(node)
+ def convert_stem(node)
return super unless node.style.to_sym == :latexmath
%(<pre#{id_attribute(node)} data-math-style="display"><code>#{node.content}</code></pre>)
end
- def inline_quoted(node)
+ def convert_inline_quoted(node)
return super unless node.type.to_sym == :latexmath
%(<code#{id_attribute(node)} data-math-style="inline">#{node.text}</code>)