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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +9 -1
- data/lib/builder_quill_content.rb +8 -3
- data/lib/builder_quill_content/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8ae4a547c1e3c1442cda33f43c27a1701c2449275d055253f34ff86912cecdcb
|
|
4
|
+
data.tar.gz: 96ee4afc1f85be21686c98392a1d114dccee311c77ba26d0aeb2250c0e26f826
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4c3d4c61011e11c8b02d6cae53170bf15e5db6fce535fc7bb210c71e69e534d3f70aff31381581653b76862d5e60278f732800e88b8328f132787079dace0278
|
|
7
|
+
data.tar.gz: '068a870614c6d23313998a7115b60b2b519da77b11ba018259746aea53554d17863c8efa246a33f54b7573b936236594e94ec49a2f0eab3d429c46e35cedda3c'
|
data/Gemfile.lock
CHANGED
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.
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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'
|
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.
|
|
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-
|
|
11
|
+
date: 2020-03-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email:
|