kramdown-prismic 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/kramdown/converter/prismic.rb +1 -1
- data/lib/kramdown-prismic/version.rb +1 -1
- data/test/converter_test.rb +23 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f68acd9978784949a29e81dc9109f155a5aaa3fbe278142a48b5ea0d667f327b
|
4
|
+
data.tar.gz: eabfc7d18d6ad918f14645d8988d818f27dee74d885ac2e5d22241f633fbc43b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f98e7ec71902a5b7314a978ccae442d2eda5922e69a8217cc6fefcb78c33c19db41244901e50c8fa31517ee468ca62625ffaff987ef683e81532d9cdd2cafe1d
|
7
|
+
data.tar.gz: 7246ec24dd0a0d96b0f736c9f08e0d4c7a8477af0d920091091c8cfee817fb350aeace1175bc33dc7776770c3737fe96054baed3299733c9be4d75af1a3dbf13
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -40,7 +40,7 @@ module Kramdown
|
|
40
40
|
if child.children.size > 1
|
41
41
|
warning('images inside content will be moved to the top level and may be rendered differently')
|
42
42
|
end
|
43
|
-
elsif element.type
|
43
|
+
elsif [:ul, :ol].include?(element.type)
|
44
44
|
warning('nested list moved to the top level')
|
45
45
|
elements << element
|
46
46
|
extract_non_nestable_elements(element, elements)
|
data/test/converter_test.rb
CHANGED
@@ -269,6 +269,29 @@ class KramdownPrismicConverterTest < Minitest::Test
|
|
269
269
|
assert_equal 1, doc.warnings.size
|
270
270
|
end
|
271
271
|
|
272
|
+
def test_convert_nested_ol
|
273
|
+
expected = [
|
274
|
+
{
|
275
|
+
type: 'list-item',
|
276
|
+
content: {
|
277
|
+
text: "item1\n",
|
278
|
+
spans: []
|
279
|
+
}
|
280
|
+
},
|
281
|
+
{
|
282
|
+
type: 'o-list-item',
|
283
|
+
content: {
|
284
|
+
text: 'item2',
|
285
|
+
spans: []
|
286
|
+
}
|
287
|
+
}
|
288
|
+
]
|
289
|
+
markdown = "- item1\n 1. item2"
|
290
|
+
doc = Kramdown::Document.new(markdown, input: :markdown)
|
291
|
+
assert_equal expected, doc.to_prismic
|
292
|
+
assert_equal 1, doc.warnings.size
|
293
|
+
end
|
294
|
+
|
272
295
|
def test_convert_nested_nested_ul
|
273
296
|
expected = [
|
274
297
|
{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kramdown-prismic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- François de Metz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kramdown
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
|
-
rubygems_version: 3.
|
110
|
+
rubygems_version: 3.0.3
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: A Kramdown converter to convert documents into prismic rich text format and
|