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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe3e038c22a918d48b71b44a5b4910910bd8b47bf18516244510ba3e2ddc5602
4
- data.tar.gz: 6d0280c72a7efee6a1edc6b15c06068c014c1eb21c3950fbc9768a8f0942ca92
3
+ metadata.gz: f68acd9978784949a29e81dc9109f155a5aaa3fbe278142a48b5ea0d667f327b
4
+ data.tar.gz: eabfc7d18d6ad918f14645d8988d818f27dee74d885ac2e5d22241f633fbc43b
5
5
  SHA512:
6
- metadata.gz: 99c4e82d82ae1d57b66747991976660aff280a52f346b7d459f80b3d8b86d6829eaf2bc966b6387cd4aec1fb2fbf7819db8c40e57da28f9a2c583cb1482965e7
7
- data.tar.gz: c7c91856d596c6f4441e333f00830facddcf744ab588bccd02f25e2ad749b700b6fcae7aeb3181c7261b3f1bce0e21f07dfa2fa504de9f8e5c9bc8a41d21be37
6
+ metadata.gz: f98e7ec71902a5b7314a978ccae442d2eda5922e69a8217cc6fefcb78c33c19db41244901e50c8fa31517ee468ca62625ffaff987ef683e81532d9cdd2cafe1d
7
+ data.tar.gz: 7246ec24dd0a0d96b0f736c9f08e0d4c7a8477af0d920091091c8cfee817fb350aeace1175bc33dc7776770c3737fe96054baed3299733c9be4d75af1a3dbf13
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 0.3.6
4
+
5
+ - Fix converting nested numbered list.
6
+
3
7
  ## Version 0.3.5
4
8
 
5
9
  - Convert `br` element when converting HTML documents.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kramdown-prismic (0.3.5)
4
+ kramdown-prismic (0.3.6)
5
5
  kramdown (>= 1, < 3)
6
6
 
7
7
  GEM
@@ -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 == :ul
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KramdownPrismic
4
- VERSION = '0.3.5'
4
+ VERSION = '0.3.6'
5
5
  end
@@ -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.5
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-04 00:00:00.000000000 Z
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.1.4
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