builder_quill_content 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/builder_quill_content.rb +7 -2
- 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: c8ae5025ab31bcfa7a716431be579fb1ee7a279724c1d7ffab1a6a1775dd5b64
|
4
|
+
data.tar.gz: 214ebcbe24cfdc56e13ee64e78c6d30cf594acd63828cd05023c69569aa88c38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 143de3efae9414d5d22f4b6b26415a925311300224dd8d2385b353ca7f689d71df912bccbde6a76a7fd4a90b3dc4f296d09e0ea200cc410c099f231eaeeebb74
|
7
|
+
data.tar.gz: 53c35b3645a27631ad7dfac1c742851be2529e04f539b829041e7b3d0ebbfe4ed00a6586b3396a08792d14bf787d3b9c138013e84a9af2e6d170c054529444d3
|
@@ -1,13 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
class BuilderQuillContent
|
4
|
+
attr_accessor :content
|
5
|
+
|
4
6
|
VALID_INLINE_KEYS = %w[italic bold header blockquote link list].freeze
|
5
7
|
VALID_MEDIA_KEYS = %w[wk-image wk-youtube wk-tweet wk-instagram wk-divider waku-post wk-maps].freeze
|
6
8
|
START_VALID_HTML_TAGS = %w[<h2 <div <ul <hr <blockquote].freeze
|
7
9
|
END_VALID_HTML_TAGS = %w[/h2> /div> /ul> hr> /blockquote>].freeze
|
8
10
|
|
9
|
-
def
|
11
|
+
def initialize(content)
|
10
12
|
@content = content
|
13
|
+
end
|
14
|
+
|
15
|
+
def to_html
|
11
16
|
save_tag_p = result = ''
|
12
17
|
|
13
18
|
convert_inline.each_with_index do |text, i|
|
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: 0.1.
|
4
|
+
version: 0.1.1
|
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-02-
|
11
|
+
date: 2020-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|