gitlab_kramdown 0.23.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: fd008357fe0691d1dd3ca1cd547d286b91ec54f1c4c6acddb9da0bbbde9d2062
4
- data.tar.gz: c24b8c2dd6c43941c16d831874739a509c1aced21fb6397a3a78f41c60f47507
3
+ metadata.gz: 0b72dbb3632102edd2d1ed7f12415d959a156e2fa34a480f0a04e00c5df0b38b
4
+ data.tar.gz: ea6b714376e1d8c27d7e49a3e459074c1629c8ce78d3ea2d039475e48b591644
5
5
  SHA512:
6
- metadata.gz: cc4fb9800eb6fa1c8eee5e48271a7b77dff31cf9a236b3fe38afd3aaf2c72ef011d50cabc27e8fbb85d305204511a521d11091f14f8b17ef20b06c0b6dbf49a1
7
- data.tar.gz: fa56084fc50fc3ad1844decb04d1376aed15f3e29e8b89102b586f0702323e62bbaaa4963a1d632016cf05e056cd851930b46efdea7a4e2b1607bae212d3ac9b
6
+ metadata.gz: b45d3008b676fb8c80371fd4478b4cf39ec60f661c8ab4c0b796b0e94c81c381efd9a56162da48f52f05677f7e6691387e364454675a15bfa5323bae399edf67
7
+ data.tar.gz: 8897ea13d6449086faace11e18eedb7473054ded746ede57f1bc3acb0fc5afc7253aa7cac8efc6c143dbbf01d36751ba72aa0bd9fe9d162aaa752460ee906e92
data/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.24.0] - 2022-01-27
11
+
12
+ ### Changed
13
+
14
+ - Update Ruby version to 3.0.5, and test against 3.0 and 3.2.
15
+ - Update Gem dependencies.
16
+
10
17
  ## [0.23.0] - 2022-11-30
11
18
 
12
19
  ### Fixed
@@ -203,6 +210,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
203
210
  - Special GitLab References
204
211
  - Multiline Blockquote
205
212
 
213
+ [0.24.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.23.0...v0.24.0
206
214
  [0.23.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.22.0...v0.23.0
207
215
  [0.22.0]: https://gitlab.com/gitlab-org/ruby/gems/gitlab_kramdown/-/compare/v0.21.0...v0.22.0
208
216
  [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.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.23.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-11-30 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,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
@@ -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.26
228
+ rubygems_version: 3.4.5
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: GitLab Flavored Kramdown