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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -0
- data/lib/gitlab_kramdown/parser/autolink.rb +2 -0
- data/lib/gitlab_kramdown/parser/escape.rb +2 -0
- data/lib/gitlab_kramdown/parser/fenced_blockquote.rb +2 -0
- data/lib/gitlab_kramdown/parser/fenced_codeblock.rb +2 -0
- data/lib/gitlab_kramdown/parser/header.rb +9 -9
- data/lib/gitlab_kramdown/version.rb +1 -1
- data/lib/kramdown/parser/gitlab_kramdown.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b72dbb3632102edd2d1ed7f12415d959a156e2fa34a480f0a04e00c5df0b38b
|
4
|
+
data.tar.gz: ea6b714376e1d8c27d7e49a3e459074c1629c8ce78d3ea2d039475e48b591644
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
@@ -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
|
@@ -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]+\{
|
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
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
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
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
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
|
@@ -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
|
-
|
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.
|
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:
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
228
|
+
rubygems_version: 3.4.5
|
229
229
|
signing_key:
|
230
230
|
specification_version: 4
|
231
231
|
summary: GitLab Flavored Kramdown
|