kramdown-prismic 0.3.6 → 0.3.7
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 +4 -0
- data/lib/kramdown-prismic/version.rb +1 -1
- data/test/converter_test.rb +23 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c409891cb5fb66652154697c053d2f4898c2bdbdb40f90a42df53eb2c41994f2
|
4
|
+
data.tar.gz: aa59f8c4ea6b262abbadea2a810e91901a3bb719bf28dd94206b17d2f46a5204
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7da022135525388a0fb64b091804e65cef0e1307e7ff2cfb0203f3c007fc736393d600dd3119441073fcb73fed956ad45b015d90d4b720ecfacc8851d7132a4e
|
7
|
+
data.tar.gz: 7fbf4b233127d8bba128bcad4624ca13008f1a0dbc6e8c8a7121ac87c8fd72e11f90b046a738cb516965da42ef9c228fcab13fee2bbbc931e98ebbc5a3871701
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -44,6 +44,10 @@ module Kramdown
|
|
44
44
|
warning('nested list moved to the top level')
|
45
45
|
elements << element
|
46
46
|
extract_non_nestable_elements(element, elements)
|
47
|
+
elsif element.type == :header
|
48
|
+
warning('header moved to the top level')
|
49
|
+
elements << element
|
50
|
+
extract_non_nestable_elements(element, elements)
|
47
51
|
else
|
48
52
|
memo << element
|
49
53
|
extract_non_nestable_elements(element, elements)
|
data/test/converter_test.rb
CHANGED
@@ -322,6 +322,29 @@ class KramdownPrismicConverterTest < Minitest::Test
|
|
322
322
|
assert_equal 2, doc.warnings.size
|
323
323
|
end
|
324
324
|
|
325
|
+
def test_convert_heading_in_list
|
326
|
+
expected = [
|
327
|
+
{
|
328
|
+
type: 'list-item',
|
329
|
+
content: {
|
330
|
+
text: "",
|
331
|
+
spans: []
|
332
|
+
}
|
333
|
+
},
|
334
|
+
{
|
335
|
+
type: 'heading4',
|
336
|
+
content: {
|
337
|
+
text: 'Title',
|
338
|
+
spans: []
|
339
|
+
}
|
340
|
+
}
|
341
|
+
]
|
342
|
+
html = "<ul><li><h4>Title</h4></li></ul>"
|
343
|
+
doc = Kramdown::Document.new(html, input: :html)
|
344
|
+
assert_equal expected, doc.to_prismic
|
345
|
+
assert_equal 1, doc.warnings.size
|
346
|
+
end
|
347
|
+
|
325
348
|
def test_convert_preformatted
|
326
349
|
expected = [
|
327
350
|
{
|
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.7
|
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-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kramdown
|