rich_text_renderer 0.3.0 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/rich_text_renderer/base_node_renderer.rb +1 -1
- data/lib/rich_text_renderer/null_renderer.rb +1 -0
- data/lib/rich_text_renderer/renderer.rb +2 -0
- data/lib/rich_text_renderer/text_renderers/subscript_renderer.rb +14 -0
- data/lib/rich_text_renderer/text_renderers/superscript_renderer.rb +14 -0
- data/lib/rich_text_renderer/text_renderers.rb +2 -0
- data/lib/rich_text_renderer/version.rb +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc2ac61e3788fba35d898cdf202007d686540f0f429cf31b1e07ce942558242d
|
4
|
+
data.tar.gz: b61855b96415081aaf0090712414a3575db2052a42394eafdf75abf7067835a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f79323f87dd97432beb14a6ffa33513ec3ffd1782be5cb7ec1305b742bbfb87b3227e28e0d784434eaad3991d72b7d5a4938e6dfdf50f1e138e446169659f18
|
7
|
+
data.tar.gz: f2d4ba77cc7aa890ac6fc1352bd9516dba9cd7155f4bcd0bd2048455e7f4c80021aec5b6e752a5e99b87a08762a9329dfdb164334bbc8cc9676e65744f1c2911
|
data/CHANGELOG.md
CHANGED
@@ -10,7 +10,7 @@ module RichTextRenderer
|
|
10
10
|
protected
|
11
11
|
|
12
12
|
def find_renderer(node)
|
13
|
-
renderer = mappings[node['nodeType']]
|
13
|
+
renderer = mappings[node.to_h['nodeType']]
|
14
14
|
return mappings[nil].new(mappings) if renderer.nil? && mappings.key?(nil)
|
15
15
|
renderer.new(mappings) unless renderer.nil?
|
16
16
|
end
|
@@ -33,6 +33,8 @@ module RichTextRenderer
|
|
33
33
|
'code' => CodeRenderer,
|
34
34
|
'italic' => ItalicRenderer,
|
35
35
|
'underline' => UnderlineRenderer,
|
36
|
+
'superscript' => SuperscriptRenderer,
|
37
|
+
'subscript' => SubscriptRenderer,
|
36
38
|
'table' => TableRenderer,
|
37
39
|
'table-row' => TableRowRenderer,
|
38
40
|
'table-cell' => TableCellRenderer,
|
@@ -3,3 +3,5 @@ require_relative './text_renderers/bold_renderer'
|
|
3
3
|
require_relative './text_renderers/code_renderer'
|
4
4
|
require_relative './text_renderers/italic_renderer'
|
5
5
|
require_relative './text_renderers/underline_renderer'
|
6
|
+
require_relative './text_renderers/superscript_renderer'
|
7
|
+
require_relative './text_renderers/subscript_renderer'
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rich_text_renderer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Contentful GmbH (David Litvak Bruno)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,6 +206,8 @@ files:
|
|
206
206
|
- lib/rich_text_renderer/text_renderers/bold_renderer.rb
|
207
207
|
- lib/rich_text_renderer/text_renderers/code_renderer.rb
|
208
208
|
- lib/rich_text_renderer/text_renderers/italic_renderer.rb
|
209
|
+
- lib/rich_text_renderer/text_renderers/subscript_renderer.rb
|
210
|
+
- lib/rich_text_renderer/text_renderers/superscript_renderer.rb
|
209
211
|
- lib/rich_text_renderer/text_renderers/text_renderer.rb
|
210
212
|
- lib/rich_text_renderer/text_renderers/underline_renderer.rb
|
211
213
|
- lib/rich_text_renderer/version.rb
|