diff --git a/Gemfile b/Gemfile index 81294ebe39e..cd8bdeca813 100644 --- a/Gemfile +++ b/Gemfile @@ -150,7 +150,7 @@ gem 'deckar01-task_list', '2.3.1' gem 'gitlab-markup', '~> 1.7.1' gem 'github-markup', '~> 1.7.0', require: 'github/markup' gem 'commonmarker', '~> 0.21' -gem 'kramdown', '~> 2.3.0' +gem 'kramdown', '~> 2.3.1' gem 'RedCloth', '~> 4.3.2' gem 'rdoc', '~> 6.1.2' gem 'org-ruby', '~> 0.9.12' diff --git a/Gemfile.lock b/Gemfile.lock index 063ebc4424b..6c714c0d5dd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -669,7 +669,7 @@ GEM kgio (2.11.3) knapsack (1.17.0) rake - kramdown (2.3.0) + kramdown (2.3.1) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) @@ -1471,7 +1471,7 @@ DEPENDENCIES jwt (~> 2.1.0) kaminari (~> 1.0) knapsack (~> 1.17) - kramdown (~> 2.3.0) + kramdown (~> 2.3.1) kubeclient (~> 4.9.1) lefthook (~> 0.7) letter_opener_web (~> 1.3.4) diff --git a/changelogs/unreleased/sh-remove-kramdown-patch.yml b/changelogs/unreleased/sh-remove-kramdown-patch.yml new file mode 100644 index 00000000000..86fc282d363 --- /dev/null +++ b/changelogs/unreleased/sh-remove-kramdown-patch.yml @@ -0,0 +1,5 @@ +--- +title: Remove Kramdown patch and update to v2.3.1 gem +merge_request: 56917 +author: +type: fixed diff --git a/config/initializers/kramdown_patch.rb b/config/initializers/kramdown_patch.rb deleted file mode 100644 index 5cb769cec24..00000000000 --- a/config/initializers/kramdown_patch.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# -# This pulls in https://github.com/gettalong/kramdown/pull/708 for kramdown v2.3.0. -# Remove this file when that pull request is merged and released. -require 'kramdown/converter' -require 'kramdown/converter/syntax_highlighter/rouge' - -module Kramdown::Converter::SyntaxHighlighter - module Rouge - def self.formatter_class(opts = {}) - case formatter = opts[:formatter] - when Class - formatter - when /\A[[:upper:]][[:alnum:]_]*\z/ - ::Rouge::Formatters.const_get(formatter, false) - else - # Available in Rouge 2.0 or later - ::Rouge::Formatters::HTMLLegacy - end - rescue NameError - # Fallback to Rouge 1.x - ::Rouge::Formatters::HTML - end - end -end diff --git a/doc/ci/pipeline_editor/index.md b/doc/ci/pipeline_editor/index.md index 28394ca8147..57aea5d493b 100644 --- a/doc/ci/pipeline_editor/index.md +++ b/doc/ci/pipeline_editor/index.md @@ -10,7 +10,6 @@ type: reference > - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/4540) in GitLab 13.8. > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/270059) in GitLab 13.10. -The pipeline editor is the primary place to edit the GitLab CI/CD configuration in The pipeline editor is the primary place to edit the GitLab CI/CD configuration in the `.gitlab-ci.yml` file in the root of your repository. To access the editor, go to **CI/CD > Editor**. diff --git a/doc/development/contributing/style_guides.md b/doc/development/contributing/style_guides.md index 0f4b69d3daf..444a067a780 100644 --- a/doc/development/contributing/style_guides.md +++ b/doc/development/contributing/style_guides.md @@ -62,7 +62,6 @@ Before you push your changes, Lefthook automatically runs the following checks: - SCSS lint: Run `yarn lint:stylelint` checks (with the [`.stylelintrc`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.stylelintrc) configuration) on the modified `*.scss{,.css}` files. Tags: `stylesheet`, `css`, `style`. - RuboCop: Run `bundle exec rubocop` checks (with the [`.rubocop.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.rubocop.yml) configuration) on the modified `*.rb` files. Tags: `backend`, `style`. - Vale: Run `vale` checks (with the [`.vale.ini`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.vale.ini) configuration) on the modified `*.md` files. Tags: `documentation`, `style`. -- Documentation metadata: Run checks for the absence of [documentation metadata](../documentation/index.md#metadata). In addition to the default configuration, you can define a [local configuration](https://github.com/Arkweid/lefthook/blob/master/docs/full_guide.md#local-config). diff --git a/spec/initializers/kramdown_patch_spec.rb b/spec/lib/kramdown/kramdown_spec.rb similarity index 92% rename from spec/initializers/kramdown_patch_spec.rb rename to spec/lib/kramdown/kramdown_spec.rb index 49dda9252bb..986a8d9959e 100644 --- a/spec/initializers/kramdown_patch_spec.rb +++ b/spec/lib/kramdown/kramdown_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Kramdown patch for syntax highlighting formatters' do +RSpec.describe 'Ensure kramdown detects invalid syntax highlighting formatters' do subject { Kramdown::Document.new(options + "\n" + code).to_html } let(:code) do diff --git a/vendor/gitignore/C++.gitignore b/vendor/gitignore/C++.gitignore old mode 100644 new mode 100755 diff --git a/vendor/gitignore/Java.gitignore b/vendor/gitignore/Java.gitignore old mode 100644 new mode 100755