kramdown-prismic 0.3.4 → 0.3.5

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: 73ce49b872adc3dd34de55efc6c45bdde6ab2ec5cfd04fc4192555639ed63fb3
4
- data.tar.gz: f95a92886b915b6bf5c3b283368e84fcb4591b5b3f45e998a7ed13beb31e788f
3
+ metadata.gz: fe3e038c22a918d48b71b44a5b4910910bd8b47bf18516244510ba3e2ddc5602
4
+ data.tar.gz: 6d0280c72a7efee6a1edc6b15c06068c014c1eb21c3950fbc9768a8f0942ca92
5
5
  SHA512:
6
- metadata.gz: 1cd76efd9fb572c3f921c44b0d2ee6f6748c9132ac5827d373e581ec19361609f73acb1bac3fb8f27bc6e5c53219353e363e5a05f71dacbfbef5eb7f1d88ca16
7
- data.tar.gz: 03b6033f3576720dfaa823c808c9d29f1264813d8ec82b807f3bc72217263179f110f380b87fac3ea41157cbd4da189254a08edeb4089cb139221b6083bef86a
6
+ metadata.gz: 99c4e82d82ae1d57b66747991976660aff280a52f346b7d459f80b3d8b86d6829eaf2bc966b6387cd4aec1fb2fbf7819db8c40e57da28f9a2c583cb1482965e7
7
+ data.tar.gz: c7c91856d596c6f4441e333f00830facddcf744ab588bccd02f25e2ad749b700b6fcae7aeb3181c7261b3f1bce0e21f07dfa2fa504de9f8e5c9bc8a41d21be37
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 0.3.5
4
+
5
+ - Convert `br` element when converting HTML documents.
6
+
3
7
  ## Version 0.3.4
4
8
 
5
9
  - Convert `strong` and `em` elements 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.4)
4
+ kramdown-prismic (0.3.5)
5
5
  kramdown (>= 1, < 3)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Kramdown Prismic
1
+ # Kramdown Prismic ![build](https://img.shields.io/github/workflow/status/stormz/kramdown-prismic/CI) [![gem](https://img.shields.io/gem/v/kramdown-prismic)](https://rubygems.org/gems/kramdown-prismic)
2
2
 
3
3
  A [Kramdown][] parser and converter to convert documents into [prismic][] rich text format and the other way around.
4
4
 
@@ -110,6 +110,7 @@ module Kramdown
110
110
  end
111
111
 
112
112
  def convert_hr(element); end
113
+ def convert_br(element); end
113
114
 
114
115
  def convert_img(element)
115
116
  {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KramdownPrismic
4
- VERSION = '0.3.4'
4
+ VERSION = '0.3.5'
5
5
  end
@@ -515,6 +515,20 @@ class KramdownPrismicConverterTest < Minitest::Test
515
515
  assert_equal expected, Kramdown::Document.new(html, input: :html).to_prismic
516
516
  end
517
517
 
518
+ def test_convert_br_in_root_element
519
+ expected = [
520
+ {
521
+ type: 'paragraph',
522
+ content: {
523
+ text: "Test\n",
524
+ spans: []
525
+ }
526
+ }
527
+ ]
528
+ html = '<br><p>Test<br></p>'
529
+ assert_equal expected, Kramdown::Document.new(html, input: :html).to_prismic
530
+ end
531
+
518
532
  def test_convert_html_with_no_tags
519
533
  expected = [
520
534
  {
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
4
+ version: 0.3.5
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-08-24 00:00:00.000000000 Z
11
+ date: 2021-10-04 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.0.3
110
+ rubygems_version: 3.1.4
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: A Kramdown converter to convert documents into prismic rich text format and