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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f68acd9978784949a29e81dc9109f155a5aaa3fbe278142a48b5ea0d667f327b
4
- data.tar.gz: eabfc7d18d6ad918f14645d8988d818f27dee74d885ac2e5d22241f633fbc43b
3
+ metadata.gz: c409891cb5fb66652154697c053d2f4898c2bdbdb40f90a42df53eb2c41994f2
4
+ data.tar.gz: aa59f8c4ea6b262abbadea2a810e91901a3bb719bf28dd94206b17d2f46a5204
5
5
  SHA512:
6
- metadata.gz: f98e7ec71902a5b7314a978ccae442d2eda5922e69a8217cc6fefcb78c33c19db41244901e50c8fa31517ee468ca62625ffaff987ef683e81532d9cdd2cafe1d
7
- data.tar.gz: 7246ec24dd0a0d96b0f736c9f08e0d4c7a8477af0d920091091c8cfee817fb350aeace1175bc33dc7776770c3737fe96054baed3299733c9be4d75af1a3dbf13
6
+ metadata.gz: 7da022135525388a0fb64b091804e65cef0e1307e7ff2cfb0203f3c007fc736393d600dd3119441073fcb73fed956ad45b015d90d4b720ecfacc8851d7132a4e
7
+ data.tar.gz: 7fbf4b233127d8bba128bcad4624ca13008f1a0dbc6e8c8a7121ac87c8fd72e11f90b046a738cb516965da42ef9c228fcab13fee2bbbc931e98ebbc5a3871701
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 0.3.7
4
+
5
+ - Fix converting nested headers
6
+
3
7
  ## Version 0.3.6
4
8
 
5
9
  - Fix converting nested numbered list.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kramdown-prismic (0.3.6)
4
+ kramdown-prismic (0.3.7)
5
5
  kramdown (>= 1, < 3)
6
6
 
7
7
  GEM
@@ -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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KramdownPrismic
4
- VERSION = '0.3.6'
4
+ VERSION = '0.3.7'
5
5
  end
@@ -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.6
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-09 00:00:00.000000000 Z
11
+ date: 2021-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown