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 +4 -4
- data/CHANGELOG.md +17 -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 +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fa71e9ad769331d0d9b11f2832819ae7ed315598d63f8f2137b3496eb5ccd68
|
4
|
+
data.tar.gz: e3bd2bb21a4e4d6208b383b8e810b2cf91f76b1f13ff28b547f4b550ffe2d36b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
@@ -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.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:
|
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.
|
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.
|
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.
|
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
|
@@ -218,14 +218,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
218
218
|
requirements:
|
219
219
|
- - ">="
|
220
220
|
- !ruby/object:Gem::Version
|
221
|
-
version: '
|
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.
|
228
|
+
rubygems_version: 3.4.6
|
229
229
|
signing_key:
|
230
230
|
specification_version: 4
|
231
231
|
summary: GitLab Flavored Kramdown
|