gitlab_kramdown 0.23.0 → 0.25.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd008357fe0691d1dd3ca1cd547d286b91ec54f1c4c6acddb9da0bbbde9d2062
4
- data.tar.gz: c24b8c2dd6c43941c16d831874739a509c1aced21fb6397a3a78f41c60f47507
3
+ metadata.gz: 9fa71e9ad769331d0d9b11f2832819ae7ed315598d63f8f2137b3496eb5ccd68
4
+ data.tar.gz: e3bd2bb21a4e4d6208b383b8e810b2cf91f76b1f13ff28b547f4b550ffe2d36b
5
5
  SHA512:
6
- metadata.gz: cc4fb9800eb6fa1c8eee5e48271a7b77dff31cf9a236b3fe38afd3aaf2c72ef011d50cabc27e8fbb85d305204511a521d11091f14f8b17ef20b06c0b6dbf49a1
7
- data.tar.gz: fa56084fc50fc3ad1844decb04d1376aed15f3e29e8b89102b586f0702323e62bbaaa4963a1d632016cf05e056cd851930b46efdea7a4e2b1607bae212d3ac9b
6
+ metadata.gz: d0f70cd8f966d63f0624ee641d324e995472b18b67fc9d864c8e1f679a1c1f9207288118bd793a555e949660e32f7817d62c23df0f5afdcb1a6020d6337e3871
7
+ data.tar.gz: e2c9f5e5be57dc345613f1044bb639a056ebba2b2e5254cf13d55cb89874ecffc97aff5c235eb1eca588f4061439df90637695a277785cf5bf7f9e20a58b1bf1
data/CHANGELOG.md CHANGED
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.25.0] - 2022-02-13
11
+
12
+ ### Changed
13
+
14
+ - Update Ruby version to 3.2.1.
15
+ - Set Ruby 3.0 as the minimum required version and stop testing Ruby 2.7.
16
+ - Update Gem dependencies.
17
+
18
+ ## [0.24.0] - 2022-01-27
19
+
20
+ ### Changed
21
+
22
+ - Update Ruby version to 3.0.5, and test against 3.0 and 3.2.
23
+ - Update Gem dependencies.
24
+
10
25
  ## [0.23.0] - 2022-11-30
11
26
 
12
27
  ### Fixed
@@ -203,6 +218,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
203
218
  - Special GitLab References
204
219
  - Multiline Blockquote
205
220
 
221
+ [0.25.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.24.0...v0.25.0
222
+ [0.24.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.23.0...v0.24.0
206
223
  [0.23.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.22.0...v0.23.0
207
224
  [0.22.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.21.0...v0.22.0
208
225
  [0.21.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.20.0...v0.21.0
data/README.md CHANGED
@@ -76,6 +76,7 @@ Kramdown::Document.new(source, input: 'GitlabKramdown', syntax_highlighter: :rou
76
76
 
77
77
  - Ruby 2.7
78
78
  - Ruby 3.0
79
+ - Ruby 3.2
79
80
 
80
81
  ## Release a new version
81
82
 
@@ -22,6 +22,8 @@ module GitlabKramdown
22
22
  }x.freeze
23
23
 
24
24
  def self.included(klass)
25
+ return if klass.has_parser?(:gitlab_autolink)
26
+
25
27
  klass.define_parser(:gitlab_autolink, AUTOLINK_START)
26
28
  end
27
29
 
@@ -11,6 +11,8 @@ module GitlabKramdown
11
11
  ESCAPED_CHARS_GFM = /\\([\\.*_+`<>()\[\]{}#!:|"'$=\-~])/.freeze
12
12
 
13
13
  def self.included(klass)
14
+ return if klass.has_parser?(:escape_chars_gitlab)
15
+
14
16
  klass.define_parser(:escape_chars_gitlab, ESCAPED_CHARS_GFM, '\\\\', :parse_escaped_chars)
15
17
  end
16
18
  end
@@ -22,6 +22,8 @@ module GitlabKramdown
22
22
  }xm.freeze
23
23
 
24
24
  def self.included(klass)
25
+ return if klass.has_parser?(:fenced_blockquote)
26
+
25
27
  klass.define_parser(:fenced_blockquote, FENCED_BLOCKQUOTE_START)
26
28
  end
27
29
 
@@ -19,6 +19,8 @@ module GitlabKramdown
19
19
  FENCED_CODEBLOCK_MATCH = /^ {0,3}(([~`]){3,})\s*?((\S+?)(?:\?\S*)?)?\s*?\n(.*?)^ {0,3}\1\2*\s*?\n/m.freeze
20
20
 
21
21
  def self.included(klass)
22
+ return if klass.has_parser?(:codeblock_fenced_gitlab)
23
+
22
24
  klass.define_parser(:codeblock_fenced_gitlab, FENCED_CODEBLOCK_START, nil, 'parse_codeblock_fenced')
23
25
  end
24
26
  end
@@ -9,7 +9,7 @@ module GitlabKramdown
9
9
  #
10
10
  # @see https://docs.gitlab.com/ee/user/markdown.html#headers
11
11
  module Header
12
- HEADER_ID = /(?:[ \t]+\{#([A-Za-z][\w:-]*)\})?/.freeze
12
+ HEADER_ID = /(?:[ \t]+\{\#([A-Za-z][\w:-]*)\})?/.freeze
13
13
  SETEXT_HEADER_START = %r{
14
14
  ^(#{Kramdown::Parser::Kramdown::OPT_SPACE}[^ \t].*?)
15
15
  #{HEADER_ID}[ \t]*?\n
@@ -34,10 +34,10 @@ module GitlabKramdown
34
34
 
35
35
  if @options[:linkable_headers]
36
36
  el.children << Kramdown::Element.new(:a, nil, {
37
- 'href' => "##{el.attr['id']}",
38
- 'title' => 'Permalink',
39
- 'class' => 'anchor'
40
- }, location: start_line_number)
37
+ 'href' => "##{el.attr['id']}",
38
+ 'title' => 'Permalink',
39
+ 'class' => 'anchor'
40
+ }, location: start_line_number)
41
41
  end
42
42
 
43
43
  @tree.children << el
@@ -62,10 +62,10 @@ module GitlabKramdown
62
62
 
63
63
  if @options[:linkable_headers]
64
64
  el.children << Kramdown::Element.new(:a, nil, {
65
- 'href' => "##{el.attr['id']}",
66
- 'title' => 'Permalink',
67
- 'class' => 'anchor'
68
- }, location: start_line_number)
65
+ 'href' => "##{el.attr['id']}",
66
+ 'title' => 'Permalink',
67
+ 'class' => 'anchor'
68
+ }, location: start_line_number)
69
69
  end
70
70
 
71
71
  @tree.children << el
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitlabKramdown
4
- VERSION = '0.23.0'
4
+ VERSION = '0.25.0'
5
5
  end
@@ -28,7 +28,7 @@ module Kramdown
28
28
 
29
29
  prepend_span_parsers(:gitlab_autolink) if @options[:autolink]
30
30
  prepend_span_parsers(:escape_chars_gitlab, :commit_diff, :commit, :user_group_mention,
31
- :issue, :merge_request, :snippet, :label, :strikethrough_gitlab)
31
+ :issue, :merge_request, :snippet, :label, :strikethrough_gitlab)
32
32
  prepend_block_parsers(:fenced_blockquote)
33
33
  replace_block_parser!(:codeblock_fenced, :codeblock_fenced_gitlab)
34
34
  replace_block_parser!(:atx_header, :atx_gitlab_header)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_kramdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0
4
+ version: 0.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Mazetto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-30 00:00:00.000000000 Z
11
+ date: 2023-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.13.0
47
+ version: 1.14.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.13.0
54
+ version: 1.14.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: asciidoctor-plantuml
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,56 +86,56 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 6.4.0
89
+ version: 6.5.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 6.4.0
96
+ version: 6.5.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: bundler
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 2.3.0
103
+ version: 2.4.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 2.3.0
110
+ version: 2.4.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.21.0
117
+ version: 0.22.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.21.0
124
+ version: 0.22.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: gitlab-styles
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 9.1.0
131
+ version: 9.2.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 9.1.0
138
+ version: 9.2.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -218,14 +218,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
218
218
  requirements:
219
219
  - - ">="
220
220
  - !ruby/object:Gem::Version
221
- version: '2.7'
221
+ version: '3.0'
222
222
  required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  requirements:
224
224
  - - ">="
225
225
  - !ruby/object:Gem::Version
226
226
  version: '0'
227
227
  requirements: []
228
- rubygems_version: 3.3.26
228
+ rubygems_version: 3.4.6
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: GitLab Flavored Kramdown