slate_serializer 1.0.1 → 1.0.2
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 +3 -3
- data/lib/slate_serializer/html.rb +5 -1
- data/lib/slate_serializer/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: b4abe4cb9f13367b5ab5314c2ecf348307ae5f14bb6520f8887f30e6ad30cd55
|
4
|
+
data.tar.gz: 1930bb2fb209bac981d68aaba448ef45e5c4d8e02302c3284670c79a3dedf197
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bc7f72a4494bf92d462f19d117fd726e195039930b223006b742abf951ebfee918aebfefd653de2db89bf357f2254b371645761865181406aff2f31174125c4
|
7
|
+
data.tar.gz: 7bc1b5592eb6bd6df93d5fbf108cd3f453126bd463d9c9e282fb6d08f7c8c72b20c288511e5712f36cd0fc0547d27fbb351f1a91e750d17a23a9eab86089fe1d
|
data/Gemfile.lock
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
slate_serializer (1.0.
|
4
|
+
slate_serializer (1.0.2)
|
5
5
|
nokogiri (~> 1.11)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
diff-lcs (1.5.1)
|
11
|
-
mini_portile2 (2.8.
|
12
|
-
nokogiri (1.16.
|
11
|
+
mini_portile2 (2.8.6)
|
12
|
+
nokogiri (1.16.4)
|
13
13
|
mini_portile2 (~> 2.8.2)
|
14
14
|
racc (~> 1.4)
|
15
15
|
racc (1.7.3)
|
@@ -6,6 +6,8 @@ module SlateSerializer
|
|
6
6
|
# Default lookup list to convert html tags to object types
|
7
7
|
ELEMENTS = {
|
8
8
|
'a': 'link',
|
9
|
+
'center': 'align-center',
|
10
|
+
'code': 'code',
|
9
11
|
'img': 'image',
|
10
12
|
'li': 'list-item',
|
11
13
|
'p': 'paragraph',
|
@@ -15,7 +17,9 @@ module SlateSerializer
|
|
15
17
|
'ol': 'ordered-list',
|
16
18
|
'ul': 'unordered-list',
|
17
19
|
'table': 'table',
|
20
|
+
'thead': 'thead',
|
18
21
|
'tbody': 'tbody',
|
22
|
+
'th': 'th',
|
19
23
|
'tr': 'tr',
|
20
24
|
'td': 'td',
|
21
25
|
'text': 'text',
|
@@ -24,7 +28,7 @@ module SlateSerializer
|
|
24
28
|
'figcaption': 'figcaption'
|
25
29
|
}.freeze
|
26
30
|
# Default block types list
|
27
|
-
BLOCK_ELEMENTS = %w[figure figcaption hr img li p ol ul table tbody tr td].freeze
|
31
|
+
BLOCK_ELEMENTS = %w[center code figure figcaption hr img li p ol ul table tbody thead th tr td].freeze
|
28
32
|
# Default inline types list
|
29
33
|
INLINE_ELEMENTS = %w[a].freeze
|
30
34
|
# Default mark types list
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slate_serializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wesley Stam
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|