gitlab_kramdown 0.15.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e11a7015bbdc9b75dd012b666454950b287ba91dacdbabf260926524715d5ce6
4
- data.tar.gz: b396022c54535f3e0d3b519a0d9f6d0e20e55f1f4d86e8535f9be785aeaf4de7
3
+ metadata.gz: c7cec04213aad5f809536d2d62db1c008ab8f37f049f3724952180b9cfeee70b
4
+ data.tar.gz: 4c9e54fed1832fc5e96e3b3a383880c8ecc08d57fb816bb0290eb74e486e1ced
5
5
  SHA512:
6
- metadata.gz: e9530ea7bd5c430853f76c05bd0949c2dbf9aa7c1368c05b7018789299c6cbf61df37ab60476c711ad1db2d073d90069be28033c6b0edf897f73c362c1bb39fd
7
- data.tar.gz: 319d2a71cce247af61b2c7b8c67cb5538a2d894a0e081a55ea9ebd54af6caa1bc8280adea79344022e78bd7087fa16444d2386729af596ad3fc39b6e36bea8f1
6
+ metadata.gz: 5baef65895c7b8572f4ad7cf3ccac03648d7ca57ab1f5cb6d36b0f46ef1a534c39773c0f5fbbe2f7d4a7b91b7b9e6bce39f17b5dfd58937989b2f5301593b53f
7
+ data.tar.gz: d731fce3ad5fb1e10f8adcf7dd345fed6e9cfcf880754c067999a2656155323be9760905b47dee038acdfe6cd21be1ced6a12c6cc28b57e00e067dee25a705b9
data/CHANGELOG.md CHANGED
@@ -7,21 +7,45 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [0.15.0] - 2021-12-20
10
+ ## [0.18.0] - 2022-03-11
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Update Gem dependencies.
15
15
 
16
+ ## [0.17.0] - 2022-02-10
17
+
18
+ ### Added
19
+
20
+ - Add support for making PlantUML images a clickable link
21
+
22
+ ## [0.16.0] - 2022-01-24
23
+
24
+ ### Fixed
25
+
26
+ - Namespaced References are correctly extracted when `autolink: false`
27
+
28
+ ### Changed
29
+
30
+ - Update minimum supported Ruby to 2.7.5
31
+ - Labels are now converted to an HTML similar to GitLab
32
+ - Labels were extracted to its own parser module
33
+
34
+ ## [0.15.0] - 2021-12-20
35
+
36
+ ### Changed
37
+
38
+ - Update Gem dependencies.
39
+
16
40
  ## [0.14.0] - 2021-08-10
17
41
 
18
- ### Changes
42
+ ### Changed
19
43
 
20
44
  - Update Gem dependencies. In particular, update Nokogiri to version 1.12.x.
21
45
 
22
46
  ## [0.13.0] - 2021-07-02
23
47
 
24
- ### Changes
48
+ ### Changed
25
49
 
26
50
  - Update Gem dependencies
27
51
 
@@ -144,20 +168,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
144
168
  - Special GitLab References
145
169
  - Multiline Blockquote
146
170
 
147
- [0.15.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.14.0...v0.15.0
148
- [0.14.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.13.0...v0.14.0
149
- [0.13.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.12.0...v0.13.0
150
- [0.12.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.11.0...v0.12.0
151
- [0.11.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.10.0...v0.11.0
152
- [0.10.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.9.0...v0.10.0
153
- [0.9.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.8.0...v0.9.0
154
- [0.8.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.7.0...v0.8.0
155
- [0.7.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.6.0...v0.7.0
156
- [0.6.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.5.0...v0.6.0
157
- [0.5.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.4.2...v0.5.0
158
- [0.4.2]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.4.1...v0.4.2
159
- [0.4.1]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.4.0...v0.4.1
160
- [0.4.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.3.0...v0.4.0
161
- [0.3.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.2.0...v0.3.0
162
- [0.2.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/v0.1.0...v0.2.0
163
- [0.1.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/compare/15b5e4b46aa0e42974ec2e5ee36c68d97219736f...v0.1.0
171
+ [0.16.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.15.0...v0.16.0
172
+ [0.15.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.14.0...v0.15.0
173
+ [0.14.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.13.0...v0.14.0
174
+ [0.13.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.12.0...v0.13.0
175
+ [0.12.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.11.0...v0.12.0
176
+ [0.11.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.10.0...v0.11.0
177
+ [0.10.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.9.0...v0.10.0
178
+ [0.9.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.8.0...v0.9.0
179
+ [0.8.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.7.0...v0.8.0
180
+ [0.7.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.6.0...v0.7.0
181
+ [0.6.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.5.0...v0.6.0
182
+ [0.5.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.4.2...v0.5.0
183
+ [0.4.2]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.4.1...v0.4.2
184
+ [0.4.1]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.4.0...v0.4.1
185
+ [0.4.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.3.0...v0.4.0
186
+ [0.3.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.2.0...v0.3.0
187
+ [0.2.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/v0.1.0...v0.2.0
188
+ [0.1.0]: https://gitlab.com/gitlab-org/gitlab_kramdown/-/compare/15b5e4b46aa0e42974ec2e5ee36c68d97219736f...v0.1.0
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2018-2019 Gabriel Mazetto
3
+ Copyright (c) 2018-2022 Gabriel Mazetto
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -74,6 +74,7 @@ Kramdown::Document.new(source, input: 'GitlabKramdown', syntax_highlighter: :rou
74
74
  ## Supported and tested Ruby versions
75
75
 
76
76
  - Ruby 2.7
77
+ - Ruby 3.0
77
78
 
78
79
  ## Release a new version
79
80
 
@@ -96,7 +97,7 @@ To release a new version of GitLab Kramdown:
96
97
 
97
98
  ## Copyright
98
99
 
99
- Copyright (c) 2018-2019 Gabriel Mazetto. See LICENSE.txt for
100
+ Copyright (c) 2018-2022 Gabriel Mazetto. See LICENSE.txt for
100
101
  further details.
101
102
 
102
103
  [GitLab flavored Markdown]: https://docs.gitlab.com/ee/user/markdown.html
@@ -33,13 +33,7 @@ module GitlabKramdown
33
33
  when 'mermaid'
34
34
  %(<div class="mermaid">#{element.value}</div>\n)
35
35
  when 'plantuml'
36
- plantuml_setup
37
-
38
- img_tag = Nokogiri::HTML::DocumentFragment.parse(
39
- Asciidoctor::PlantUml::Processor.plantuml_content(element.value, {})
40
- )
41
-
42
- %(#{img_tag}\n)
36
+ render_plantuml(element)
43
37
  else
44
38
  super
45
39
  end
@@ -66,7 +60,42 @@ module GitlabKramdown
66
60
 
67
61
  href = element.attr['src']
68
62
 
69
- %(<a href="#{href}" target="_blank" rel="noopener noreferrer">#{super}</a>)
63
+ img_with_clickable_link(href, super)
64
+ end
65
+
66
+ # Label element is generated by the GitlabKramdown parser, representing GitLab labels
67
+ #
68
+ # It includes the following attributes:
69
+ # - +href+: the URL for the label
70
+ # - +label+: the name of the label without namespace part
71
+ # - +namespace+: the namespace part of the label
72
+ def convert_label(element, _indent)
73
+ label_attrs = { class: 'badge color-label' }
74
+
75
+ label_text = "#{element.attr['label']} in <i>#{element.attr['namespace']}</i>"
76
+ span_tag = format_as_span_html(:span, label_attrs, label_text)
77
+
78
+ format_as_span_html(:a, { 'href' => element.attr['href'] }, span_tag)
79
+ end
80
+
81
+ def img_with_clickable_link(href, img_html)
82
+ %(<a class="no-attachment-icon" href="#{href}" target="_blank" rel="noopener noreferrer">#{img_html}</a>)
83
+ end
84
+
85
+ def render_plantuml(element)
86
+ plantuml_setup
87
+
88
+ img_tag = Nokogiri::HTML::DocumentFragment.parse(
89
+ Asciidoctor::PlantUml::Processor.plantuml_content(element.value, {})
90
+ )
91
+
92
+ if @clickable_images
93
+ href = img_tag.at('img').attr('src')
94
+
95
+ "#{img_with_clickable_link(href, img_tag)}\n"
96
+ else
97
+ %(#{img_tag}\n)
98
+ end
70
99
  end
71
100
  end
72
101
  end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GitlabKramdown
4
+ module Parser
5
+ # GitLab Labels
6
+ #
7
+ # This parser implements non context-specific label references as described
8
+ # in the GitLab Flavored Markdown reference
9
+ #
10
+ # @see https://docs.gitlab.com/ee/user/markdown.html#special-gitlab-references
11
+ module Label
12
+ PROJECT_LABEL_PATTERN = %r{
13
+ #{Regexp.escape('~')}
14
+ (?<label>
15
+ [A-Za-z0-9_\-?.&]+ | # String-based single-word label title, or
16
+ ".+?" # String-based multi-word label surrounded in quotes
17
+ )
18
+ }x.freeze
19
+
20
+ def self.included(klass)
21
+ klass.define_parser(:label, PROJECT_LABEL_PATTERN, '\~')
22
+ end
23
+
24
+ def parse_label
25
+ start_line_number = @src.current_line_number
26
+ @src.pos += @src.matched_size
27
+
28
+ namespace = extract_reference_namespace!
29
+
30
+ # If we can't find a namespace we just add content as regular text and skip
31
+ unless namespace
32
+ add_text(@src[0])
33
+
34
+ return
35
+ end
36
+
37
+ label_name = @src[:label].delete('"')
38
+ label_param = label_name.tr(' ', '+')
39
+ href = "#{@options[:gitlab_url]}/#{namespace}/issues?label_name=#{label_param}"
40
+ label_attrs = { 'href' => href, 'label' => label_name, 'namespace' => namespace }
41
+
42
+ el = Kramdown::Element.new(:label, nil, label_attrs, location: start_line_number)
43
+
44
+ @tree.children << el
45
+ end
46
+ end
47
+ end
48
+ end
@@ -5,8 +5,10 @@ module GitlabKramdown
5
5
  # Special GitLab References
6
6
  #
7
7
  # This parser implements any non context-specific reference as described
8
- # in the GitLab Flavored Markdown reference
8
+ # in the GitLab Flavored Markdown reference, except for labels which were
9
+ # extracted into it's own module.
9
10
  #
11
+ # @see GitlabKramdown::Parser::Label
10
12
  # @see https://docs.gitlab.com/ee/user/markdown.html#special-gitlab-references
11
13
  module Reference
12
14
  PATH_REGEX = /[a-zA-Z0-9_.][a-zA-Z0-9_\-.]+/.freeze
@@ -20,20 +22,20 @@ module GitlabKramdown
20
22
  FULL_NAMESPACE_FORMAT_REGEX = %r{(#{NAMESPACE_FORMAT_REGEX}/)*#{NAMESPACE_FORMAT_REGEX}}.freeze
21
23
  ALWAYS_FULL_NAMESPACE_FORMAT_REGEX = %r{(#{NAMESPACE_FORMAT_REGEX}/)+#{NAMESPACE_FORMAT_REGEX}}.freeze
22
24
 
25
+ NAMESPACE_EXTRACTION_PATTERN = /(?<namespace>#{ALWAYS_FULL_NAMESPACE_FORMAT_REGEX})\z/.freeze
26
+
23
27
  USER_GROUP_PATTERN = %r{
24
28
  #{Regexp.escape('@')}
25
29
  (?<user>#{FULL_NAMESPACE_FORMAT_REGEX})
26
30
  }x.freeze
27
31
 
28
32
  PROJECT_COMMIT_PATTERN = %r{
29
- (?<namespace>#{ALWAYS_FULL_NAMESPACE_FORMAT_REGEX})
30
33
  #{Regexp.escape('@')}
31
34
  (?<commit>[a-f0-9]{7,40})
32
35
  (?!\.{3})
33
36
  }x.freeze
34
37
 
35
38
  PROJECT_COMMIT_DIFF_PATTERN = %r{
36
- (?<namespace>#{ALWAYS_FULL_NAMESPACE_FORMAT_REGEX})
37
39
  #{Regexp.escape('@')}
38
40
  (?<commit_source>[a-f0-9]{7,40})
39
41
  \.{3}
@@ -41,40 +43,27 @@ module GitlabKramdown
41
43
  }x.freeze
42
44
 
43
45
  PROJECT_ISSUE_PATTERN = %r{
44
- (?<namespace>#{ALWAYS_FULL_NAMESPACE_FORMAT_REGEX})
45
46
  #{Regexp.escape('#')}
46
47
  (?<issue>[1-9][0-9]*)
47
48
  }x.freeze
48
49
 
49
50
  PROJECT_MERGE_REQUEST_PATTERN = %r{
50
- (?<namespace>#{ALWAYS_FULL_NAMESPACE_FORMAT_REGEX})
51
51
  #{Regexp.escape('!')}
52
52
  (?<merge_request>[1-9][0-9]*)
53
53
  }x.freeze
54
54
 
55
55
  PROJECT_SNIPPET_PATTERN = %r{
56
- (?<namespace>#{ALWAYS_FULL_NAMESPACE_FORMAT_REGEX})
57
56
  #{Regexp.escape('$')}
58
57
  (?<snippet>[1-9][0-9]*)
59
58
  }x.freeze
60
59
 
61
- PROJECT_LABEL_PATTERN = %r{
62
- (?<namespace>#{ALWAYS_FULL_NAMESPACE_FORMAT_REGEX})
63
- #{Regexp.escape('~')}
64
- (?<label>
65
- [A-Za-z0-9_\-?.&]+ | # String-based single-word label title, or
66
- ".+?" # String-based multi-word label surrounded in quotes
67
- )
68
- }x.freeze
69
-
70
60
  def self.included(klass)
71
61
  klass.define_parser(:user_group_mention, USER_GROUP_PATTERN, '@')
72
- klass.define_parser(:commit, PROJECT_COMMIT_PATTERN, '@')
73
62
  klass.define_parser(:commit_diff, PROJECT_COMMIT_DIFF_PATTERN, '@')
63
+ klass.define_parser(:commit, PROJECT_COMMIT_PATTERN, '@')
74
64
  klass.define_parser(:issue, PROJECT_ISSUE_PATTERN, '#')
75
65
  klass.define_parser(:merge_request, PROJECT_MERGE_REQUEST_PATTERN, '\!')
76
66
  klass.define_parser(:snippet, PROJECT_SNIPPET_PATTERN, '\$')
77
- klass.define_parser(:label, PROJECT_LABEL_PATTERN, '\~')
78
67
  end
79
68
 
80
69
  def parse_user_group_mention
@@ -94,14 +83,51 @@ module GitlabKramdown
94
83
  @tree.children << el
95
84
  end
96
85
 
86
+ # Extract namespace after a reference has been found
87
+ #
88
+ # This method provides a workaround for the lack of lookbehind support
89
+ # in Ruby StringScanner.
90
+ #
91
+ # We look at pre_match content (everything before the reference in the same line)
92
+ # and extract the very last word in the string as long as it matches the
93
+ # NAMESPACE_EXTRACTION_PATTERN.
94
+ #
95
+ # We then modify the last parsed tree element's value, removing the matched
96
+ # namespace, so that we can process that as part of the reference code.
97
+ #
98
+ # @see NAMESPACE_EXTRACTION_PATTERN
99
+ def extract_reference_namespace!
100
+ data = @src.pre_match.match(NAMESPACE_EXTRACTION_PATTERN)
101
+
102
+ if data
103
+ namespace = data[:namespace]
104
+
105
+ # Remove namespace from last parsed tree value
106
+ redacted = @tree.children.last.value[0..-(namespace.size + 1)]
107
+ @tree.children.last.value = redacted
108
+ end
109
+
110
+ namespace
111
+ end
112
+
97
113
  def parse_commit
98
114
  start_line_number = @src.current_line_number
99
115
  @src.pos += @src.matched_size
100
116
 
101
- href = "#{@options[:gitlab_url]}/#{@src[:namespace]}/commit/#{@src[:commit]}"
117
+ namespace = extract_reference_namespace!
118
+ reference_text = "#{namespace}#{@src[0]}"
119
+
120
+ # If we can't find a namespace we just add content as regular text and skip
121
+ unless namespace
122
+ add_text(@src[0])
123
+
124
+ return
125
+ end
126
+
127
+ href = "#{@options[:gitlab_url]}/#{namespace}/commit/#{@src[:commit]}"
102
128
 
103
129
  el = Kramdown::Element.new(:a, nil, { 'href' => href }, location: start_line_number)
104
- add_text(@src[0], el)
130
+ add_text(reference_text, el)
105
131
  @tree.children << el
106
132
  end
107
133
 
@@ -109,11 +135,21 @@ module GitlabKramdown
109
135
  start_line_number = @src.current_line_number
110
136
  @src.pos += @src.matched_size
111
137
 
112
- href = "#{@options[:gitlab_url]}/#{@src[:namespace]}/compare/" \
138
+ namespace = extract_reference_namespace!
139
+ reference_text = "#{namespace}#{@src[0]}"
140
+
141
+ # If we can't find a namespace we just add content as regular text and skip
142
+ unless namespace
143
+ add_text(@src[0])
144
+
145
+ return
146
+ end
147
+
148
+ href = "#{@options[:gitlab_url]}/#{namespace}/compare/" \
113
149
  "#{@src[:commit_source]}...#{@src[:commit_target]}"
114
150
 
115
151
  el = Kramdown::Element.new(:a, nil, { 'href' => href }, location: start_line_number)
116
- add_text(@src[0], el)
152
+ add_text(reference_text, el)
117
153
  @tree.children << el
118
154
  end
119
155
 
@@ -121,10 +157,20 @@ module GitlabKramdown
121
157
  start_line_number = @src.current_line_number
122
158
  @src.pos += @src.matched_size
123
159
 
124
- href = "#{@options[:gitlab_url]}/#{@src[:namespace]}/issues/#{@src[:issue]}"
160
+ namespace = extract_reference_namespace!
161
+ reference_text = "#{namespace}#{@src[0]}"
162
+
163
+ # If we can't find a namespace we just add content as regular text and skip
164
+ unless namespace
165
+ add_text(@src[0])
166
+
167
+ return
168
+ end
169
+
170
+ href = "#{@options[:gitlab_url]}/#{namespace}/issues/#{@src[:issue]}"
125
171
 
126
172
  el = Kramdown::Element.new(:a, nil, { 'href' => href }, location: start_line_number)
127
- add_text(@src[0], el)
173
+ add_text(reference_text, el)
128
174
  @tree.children << el
129
175
  end
130
176
 
@@ -132,10 +178,20 @@ module GitlabKramdown
132
178
  start_line_number = @src.current_line_number
133
179
  @src.pos += @src.matched_size
134
180
 
135
- href = "#{@options[:gitlab_url]}/#{@src[:namespace]}/merge_requests/#{@src[:merge_request]}"
181
+ namespace = extract_reference_namespace!
182
+ reference_text = "#{namespace}#{@src[0]}"
183
+
184
+ # If we can't find a namespace we just add content as regular text and skip
185
+ unless namespace
186
+ add_text(@src[0])
187
+
188
+ return
189
+ end
190
+
191
+ href = "#{@options[:gitlab_url]}/#{namespace}/merge_requests/#{@src[:merge_request]}"
136
192
 
137
193
  el = Kramdown::Element.new(:a, nil, { 'href' => href }, location: start_line_number)
138
- add_text(@src[0], el)
194
+ add_text(reference_text, el)
139
195
  @tree.children << el
140
196
  end
141
197
 
@@ -143,22 +199,20 @@ module GitlabKramdown
143
199
  start_line_number = @src.current_line_number
144
200
  @src.pos += @src.matched_size
145
201
 
146
- href = "#{@options[:gitlab_url]}/#{@src[:namespace]}/snippets/#{@src[:snippet]}"
202
+ namespace = extract_reference_namespace!
203
+ reference_text = "#{namespace}#{@src[0]}"
147
204
 
148
- el = Kramdown::Element.new(:a, nil, { 'href' => href }, location: start_line_number)
149
- add_text(@src[0], el)
150
- @tree.children << el
151
- end
205
+ # If we can't find a namespace we just add content as regular text and skip
206
+ unless namespace
207
+ add_text(@src[0])
152
208
 
153
- def parse_label
154
- start_line_number = @src.current_line_number
155
- @src.pos += @src.matched_size
209
+ return
210
+ end
156
211
 
157
- label_param = @src[:label].delete('"').tr(' ', '+')
158
- href = "#{@options[:gitlab_url]}/#{@src[:namespace]}/issues?label_name=#{label_param}"
212
+ href = "#{@options[:gitlab_url]}/#{namespace}/snippets/#{@src[:snippet]}"
159
213
 
160
214
  el = Kramdown::Element.new(:a, nil, { 'href' => href }, location: start_line_number)
161
- add_text(@src[0], el)
215
+ add_text(reference_text, el)
162
216
  @tree.children << el
163
217
  end
164
218
  end
@@ -10,6 +10,7 @@ module GitlabKramdown
10
10
  autoload :FencedBlockquote, 'gitlab_kramdown/parser/fenced_blockquote'
11
11
  autoload :FencedCodeblock, 'gitlab_kramdown/parser/fenced_codeblock'
12
12
  autoload :Header, 'gitlab_kramdown/parser/header'
13
+ autoload :Label, 'gitlab_kramdown/parser/label'
13
14
  autoload :Reference, 'gitlab_kramdown/parser/reference'
14
15
  autoload :Strikethrough, 'gitlab_kramdown/parser/strikethrough'
15
16
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitlabKramdown
4
- VERSION = '0.15.0'
4
+ VERSION = '0.18.0'
5
5
  end
@@ -14,6 +14,7 @@ module Kramdown
14
14
  include ::GitlabKramdown::Parser::FencedBlockquote
15
15
  include ::GitlabKramdown::Parser::FencedCodeblock
16
16
  include ::GitlabKramdown::Parser::Header
17
+ include ::GitlabKramdown::Parser::Label
17
18
  include ::GitlabKramdown::Parser::Reference
18
19
  include ::GitlabKramdown::Parser::Strikethrough
19
20
 
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.15.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Mazetto
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-21 00:00:00.000000000 Z
11
+ date: 2022-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.3.1
19
+ version: 2.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.3.1
26
+ version: 2.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rouge
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.27.0
33
+ version: 3.28.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 3.27.0
40
+ version: 3.28.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: nokogiri
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.12.0
47
+ version: 1.13.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.12.0
54
+ version: 1.13.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: asciidoctor-plantuml
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 6.3.0
89
+ version: 6.4.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.3.0
96
+ version: 6.4.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: bundler
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -128,56 +128,56 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 6.6.0
131
+ version: 7.0.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: 6.6.0
138
+ version: 7.0.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.10.0
145
+ version: 3.11.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.10.0
152
+ version: 3.11.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rspec_junit_formatter
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 0.4.0
159
+ version: 0.5.0
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 0.4.0
166
+ version: 0.5.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: benchmark-ips
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 2.9.0
173
+ version: 2.10.0
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 2.9.0
180
+ version: 2.10.0
181
181
  description: GitLab Flavored Markdown extensions on top of Kramdown markup. Tries
182
182
  to be as close as possible to existing extensions.
183
183
  email:
@@ -197,19 +197,20 @@ files:
197
197
  - lib/gitlab_kramdown/parser/fenced_blockquote.rb
198
198
  - lib/gitlab_kramdown/parser/fenced_codeblock.rb
199
199
  - lib/gitlab_kramdown/parser/header.rb
200
+ - lib/gitlab_kramdown/parser/label.rb
200
201
  - lib/gitlab_kramdown/parser/reference.rb
201
202
  - lib/gitlab_kramdown/parser/strikethrough.rb
202
203
  - lib/gitlab_kramdown/version.rb
203
204
  - lib/kramdown/parser/gitlab_kramdown.rb
204
- homepage: https://gitlab.com/gitlab-org/gitlab_kramdown
205
+ homepage: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown
205
206
  licenses:
206
207
  - MIT
207
208
  metadata:
208
- homepage_uri: https://gitlab.com/gitlab-org/gitlab_kramdown
209
- source_code_uri: https://gitlab.com/gitlab-org/gitlab_kramdown
210
- changelog_uri: https://gitlab.com/gitlab-org/gitlab_kramdown/blob/main/CHANGELOG.md
211
- bug_tracker_uri: https://gitlab.com/gitlab-org/gitlab_kramdown/-/issues
212
- post_install_message:
209
+ homepage_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown
210
+ source_code_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown
211
+ changelog_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/blob/main/CHANGELOG.md
212
+ bug_tracker_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/issues
213
+ post_install_message:
213
214
  rdoc_options: []
214
215
  require_paths:
215
216
  - lib
@@ -217,7 +218,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
217
218
  requirements:
218
219
  - - ">="
219
220
  - !ruby/object:Gem::Version
220
- version: 2.7.4
221
+ version: 2.7.5
221
222
  required_rubygems_version: !ruby/object:Gem::Requirement
222
223
  requirements:
223
224
  - - ">="
@@ -225,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
226
  version: '0'
226
227
  requirements: []
227
228
  rubygems_version: 3.1.6
228
- signing_key:
229
+ signing_key:
229
230
  specification_version: 4
230
231
  summary: GitLab Flavored Kramdown
231
232
  test_files: []