draftjs_html 0.10.0 → 0.12.0

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: 80c53506fa59d06daa51517049055d61a21740a9cb6f68d7cc04a22fc40d116c
4
- data.tar.gz: 9e678df882452e6917e88250884619e242ea38a28bd61a33c1bbdfb9c2ffc6f8
3
+ metadata.gz: 64964e629da00518122848b73f2d233df3ccf36ad70b01df292a9f3d6596b35d
4
+ data.tar.gz: 4e17e6825b69e260d3e6e08e7391037be69940ae39a28a06ea689ead498da010
5
5
  SHA512:
6
- metadata.gz: b866a4dc37c5c776c174fafb0cd87f110d386a692e97d39147bbb74669ce0a5ed9b50c8bf250cc6bf58bc7e5db05291d156053131c15e96f2be95c5ca2e31af9
7
- data.tar.gz: c53aa1b233e2a4ad68a9ecdc70fe4531565c418cdaa603512e3df8ff986fcbfe0d1f1adb6590b433c285fbddcf7c18370875e17cf0d5a550b56780e0dc85d8c4
6
+ metadata.gz: cc2162d612c85e58a26a91ec25412fcca1d780609563d9032bc4108b8e015198da53cbf39f0cd7cf91b25b03f2bf9e9f566e083f4fc981703f7adef81a6c3368
7
+ data.tar.gz: 1ae9b058c647284138228d54a503766c4a16a94c15b0060598577ab45cdf07af25ddce9b2fa6cfc118c0d1d9e0e7bb04fc2e77609eaf2b3478d1f78e31134409
@@ -8,7 +8,7 @@ module DraftjsHtml
8
8
  key: raw['key'],
9
9
  text: raw['text'],
10
10
  type: raw['type'],
11
- depth: raw['depth'],
11
+ depth: raw.fetch('depth', 0).to_i,
12
12
  inline_style_ranges: Array(raw['inlineStyleRanges']),
13
13
  raw_entity_ranges: Array(raw['entityRanges']),
14
14
  )
@@ -16,6 +16,7 @@ module DraftjsHtml
16
16
  {
17
17
  'text' => block.text,
18
18
  'type' => block.type,
19
+ 'depth' => block.depth,
19
20
  'inlineStyleRanges' => block.inline_styles.map { { 'style' => _1.name, 'offset' => _1.offset, 'length' => _1.length } },
20
21
  'entityRanges' => block.entity_ranges.map { { 'key' => _1.name, 'offset' => _1.offset, 'length' => _1.length } },
21
22
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DraftjsHtml
4
- VERSION = "0.10.0"
4
+ VERSION = "0.12.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: draftjs_html
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Taylor