gitlab_kramdown 0.22.0 → 0.24.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: c7f7bb3bbb72c74671880c9e132fd979f851cb4e05f5d078882bf6377f01a611
4
- data.tar.gz: c3bf5e149e8723109795ae748fd9bf2f4e072e271a7b2000db09d76a9060a743
3
+ metadata.gz: 0b72dbb3632102edd2d1ed7f12415d959a156e2fa34a480f0a04e00c5df0b38b
4
+ data.tar.gz: ea6b714376e1d8c27d7e49a3e459074c1629c8ce78d3ea2d039475e48b591644
5
5
  SHA512:
6
- metadata.gz: d45ee379b2311d01e3f016b3fa63830747119221d35cb34e0dd05658d7987c1bb0fab2512a6614982154948480df935aae9d3ea8414cfae4b6cd260e6a0a91ce
7
- data.tar.gz: 560b91d2f41a859736f1921c3101ac8993754c509b7f37d85163db40f5746ea9e7aac5eca7bc517d9114ce881c2ea604814efa86e838849a05203a299b627616
6
+ metadata.gz: b45d3008b676fb8c80371fd4478b4cf39ec60f661c8ab4c0b796b0e94c81c381efd9a56162da48f52f05677f7e6691387e364454675a15bfa5323bae399edf67
7
+ data.tar.gz: 8897ea13d6449086faace11e18eedb7473054ded746ede57f1bc3acb0fc5afc7253aa7cac8efc6c143dbbf01d36751ba72aa0bd9fe9d162aaa752460ee906e92
data/CHANGELOG.md CHANGED
@@ -7,33 +7,51 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [0.22.0] - 2022-01-01
10
+ ## [0.24.0] - 2022-01-27
11
11
 
12
- ### Changes
12
+ ### Changed
13
+
14
+ - Update Ruby version to 3.0.5, and test against 3.0 and 3.2.
15
+ - Update Gem dependencies.
16
+
17
+ ## [0.23.0] - 2022-11-30
18
+
19
+ ### Fixed
20
+
21
+ - Instructions for releasing new versions
22
+ - Small fixes to CHANGELOG.md
23
+
24
+ ### Changed
25
+
26
+ - Update Ruby version to 2.7.7 and update Gem dependencies.
27
+
28
+ ## [0.22.0] - 2022-10-31
29
+
30
+ ### Changed
13
31
 
14
32
  - Relax Ruby requirement to be all 2.7.x versions.
15
33
 
16
- ## [0.21.0] - 2022-10-24
34
+ ## [0.21.0] - 2022-10-23
17
35
 
18
- ### Changes
36
+ ### Changed
19
37
 
20
38
  - Update dependencies and opt-in to new RuboCop cops
21
39
 
22
40
  ## [0.20.0] - 2022-06-13
23
41
 
24
- ### Changes
42
+ ### Changed
25
43
 
26
44
  - Update required Ruby version to 2.7.6 and update Gem dependencies.
27
45
 
28
46
  ## [0.19.0] - 2022-04-26
29
47
 
30
- ### Changes
48
+ ### Changed
31
49
 
32
50
  - Update Bundler and other Gem dependencies.
33
51
 
34
52
  ## [0.18.0] - 2022-03-11
35
53
 
36
- ### Changes
54
+ ### Changed
37
55
 
38
56
  - Update Gem dependencies.
39
57
 
@@ -192,21 +210,29 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
192
210
  - Special GitLab References
193
211
  - Multiline Blockquote
194
212
 
195
- [0.16.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.15.0...v0.16.0
196
- [0.15.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.14.0...v0.15.0
197
- [0.14.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.13.0...v0.14.0
198
- [0.13.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.12.0...v0.13.0
199
- [0.12.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.11.0...v0.12.0
200
- [0.11.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.10.0...v0.11.0
201
- [0.10.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.9.0...v0.10.0
202
- [0.9.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.8.0...v0.9.0
203
- [0.8.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.7.0...v0.8.0
204
- [0.7.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.6.0...v0.7.0
205
- [0.6.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.5.0...v0.6.0
206
- [0.5.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.4.2...v0.5.0
207
- [0.4.2]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.4.1...v0.4.2
208
- [0.4.1]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.4.0...v0.4.1
209
- [0.4.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.3.0...v0.4.0
210
- [0.3.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.2.0...v0.3.0
211
- [0.2.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.1.0...v0.2.0
212
- [0.1.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/15b5e4b46aa0e42974ec2e5ee36c68d97219736f...v0.1.0
213
+ [0.24.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.23.0...v0.24.0
214
+ [0.23.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.22.0...v0.23.0
215
+ [0.22.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.21.0...v0.22.0
216
+ [0.21.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.20.0...v0.21.0
217
+ [0.20.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.19.0...v0.20.0
218
+ [0.19.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.18.0...v0.19.0
219
+ [0.18.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.17.0...v0.18.0
220
+ [0.17.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.16.0...v0.17.0
221
+ [0.16.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.15.0...v0.16.0
222
+ [0.15.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.14.0...v0.15.0
223
+ [0.14.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.13.0...v0.14.0
224
+ [0.13.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.12.0...v0.13.0
225
+ [0.12.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.11.0...v0.12.0
226
+ [0.11.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.10.0...v0.11.0
227
+ [0.10.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.9.0...v0.10.0
228
+ [0.9.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.8.0...v0.9.0
229
+ [0.8.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.7.0...v0.8.0
230
+ [0.7.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.6.0...v0.7.0
231
+ [0.6.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.5.0...v0.6.0
232
+ [0.5.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.4.2...v0.5.0
233
+ [0.4.2]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.4.1...v0.4.2
234
+ [0.4.1]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.4.0...v0.4.1
235
+ [0.4.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.3.0...v0.4.0
236
+ [0.3.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.2.0...v0.3.0
237
+ [0.2.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.1.0...v0.2.0
238
+ [0.1.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/15b5e4b46aa0e42974ec2e5ee36c68d97219736f...v0.1.0
data/README.md CHANGED
@@ -76,13 +76,15 @@ 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
 
82
83
  To release a new version of GitLab Kramdown:
83
84
 
84
85
  1. Update the `CHANGELOG.md` file for the new version.
85
- 1. Check `lib/gitlab_kramdown/gitlab_kramdown.rb` is updated for the new version.
86
+ 1. Check `lib/gitlab_kramdown/version.rb` is updated for the new version.
87
+ 1. Commit changes to a new branch.
86
88
  1. Run `rake release`.
87
89
 
88
90
  ## Contributing to gitlab_kramdown
@@ -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.22.0'
4
+ VERSION = '0.24.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.22.0
4
+ version: 0.24.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-10-31 00:00:00.000000000 Z
11
+ date: 2023-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown
@@ -86,70 +86,70 @@ 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.0.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.0.0
138
+ version: 9.2.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 3.11.0
145
+ version: 3.12.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 3.11.0
152
+ version: 3.12.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rspec_junit_formatter
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  - !ruby/object:Gem::Version
226
226
  version: '0'
227
227
  requirements: []
228
- rubygems_version: 3.3.24
228
+ rubygems_version: 3.4.5
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: GitLab Flavored Kramdown