builder_quill_content 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bf0b0466b4b1bf2e8007ca49c09df336579a773e63d73381eb1ad7b4caec4a3
4
- data.tar.gz: 39af08716338101c5f101b09a656e8247f7c78531016765dc8378ec52c9012be
3
+ metadata.gz: 8ae4a547c1e3c1442cda33f43c27a1701c2449275d055253f34ff86912cecdcb
4
+ data.tar.gz: 96ee4afc1f85be21686c98392a1d114dccee311c77ba26d0aeb2250c0e26f826
5
5
  SHA512:
6
- metadata.gz: fe7b4f2bab24f55407e367ec0063f7aec4648a3fad484861147f061bf48335eeff87ba37cf10dff74723e18bdbec2da9988d2fd9304252b4816095200e13f639
7
- data.tar.gz: ab30bae60b16b1c43f4d893291cb7bb3f2c06002a1ba62713fb57bfedfcc7c6f862efd05089279de3171a5f2318318295ebb2178907330f05c26a779a2cd2749
6
+ metadata.gz: 4c3d4c61011e11c8b02d6cae53170bf15e5db6fce535fc7bb210c71e69e534d3f70aff31381581653b76862d5e60278f732800e88b8328f132787079dace0278
7
+ data.tar.gz: '068a870614c6d23313998a7115b60b2b519da77b11ba018259746aea53554d17863c8efa246a33f54b7573b936236594e94ec49a2f0eab3d429c46e35cedda3c'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- builder_quill_content (1.0.0)
4
+ builder_quill_content (1.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -7,7 +7,7 @@ Welcome to your new gem! In this directory, you'll find the files you need to be
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'builder_quill_content', '~> 1.0.0'
10
+ gem 'builder_quill_content', '~> 1.1.0'
11
11
  ```
12
12
 
13
13
  And then execute:
@@ -24,6 +24,14 @@ Or install it yourself as:
24
24
  BuilderQuillContent.new(quill_content).to_html
25
25
  ```
26
26
 
27
+ ## ChangeLog
28
+
29
+ ### Version 1.1 - 03/12/2020
30
+
31
+ ```
32
+ Fix bug add to content if the input have only 1 node and not include "\n"
33
+ ```
34
+
27
35
  ## Development
28
36
 
29
37
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -21,11 +21,16 @@ class BuilderQuillContent
21
21
  while content_json.length.positive?
22
22
  node = content_json.shift
23
23
 
24
- end_of_line(node['attributes']) && next if node['insert'] == "\n"
25
- break_line(node['insert']) && next if node['insert'].include?("\n")
26
- inline(node)
24
+ if node['insert'] == "\n"
25
+ end_of_line(node['attributes'])
26
+ elsif node['insert'].include?("\n")
27
+ break_line(node['insert'])
28
+ else
29
+ inline(node)
30
+ end
27
31
  end
28
32
 
33
+ @content += @line unless @line.strip.empty?
29
34
  @content.gsub('</ul><ul>', '')
30
35
  rescue JSON::ParserError
31
36
  'No content'
@@ -1,3 +1,3 @@
1
1
  class BuilderQuillContent
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: builder_quill_content
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Tran
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-04 00:00:00.000000000 Z
11
+ date: 2020-03-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: