prawn-html 0.6.2 → 0.6.4
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/README.md +2 -0
- data/lib/prawn_html/document_renderer.rb +2 -1
- data/lib/prawn_html/tags/li.rb +3 -1
- data/lib/prawn_html/utils.rb +1 -1
- data/lib/prawn_html/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c773502449714d4f0a6f2401721ba67a349731ef9f0c525216864b355fbe76c8
|
4
|
+
data.tar.gz: 8857a7761f343367a4c6496757c767b6b62b46d0d840df96a7d545c3693c744f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51be5bfbbf4427f6124a4a00cfb399017d6b806d8d3d2bb228fc81b7547a3cbaffe535767c5270a2666bed0a9abd89099d156dd79b1ea638d39101e528207be0
|
7
|
+
data.tar.gz: 520221561fc067919e098349fe6fab940290f6de419b37722679eacbb959055700620539c067d6a57786e7d4396bd0a4659e0f95428b09a96c3a93c55e174bda
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Prawn HTML
|
2
2
|
[](https://rubygems.org/gems/prawn-html)
|
3
|
+
[](https://rubygems.org/gems/prawn-html)
|
4
|
+
[](https://codeclimate.com/github/blocknotes/prawn-html/maintainability)
|
3
5
|
[](https://github.com/blocknotes/prawn-html/actions/workflows/linters.yml)
|
4
6
|
[](https://github.com/blocknotes/prawn-html/actions/workflows/specs.yml)
|
5
7
|
|
@@ -106,7 +106,8 @@ module PrawnHtml
|
|
106
106
|
end
|
107
107
|
|
108
108
|
def prepare_text(content)
|
109
|
-
|
109
|
+
before_content = context.before_content
|
110
|
+
text = before_content ? ::Oga::HTML::Entities.decode(before_content) : ''
|
110
111
|
return (@last_text = text + content) if context.white_space_pre?
|
111
112
|
|
112
113
|
content = content.lstrip if @last_text[-1] == ' ' || @last_tag_open
|
data/lib/prawn_html/tags/li.rb
CHANGED
data/lib/prawn_html/utils.rb
CHANGED
@@ -45,7 +45,7 @@ module PrawnHtml
|
|
45
45
|
|
46
46
|
if val.match /\A#([a-f0-9]{3})\Z/ # rubocop:disable Performance/RedundantMatch
|
47
47
|
r, g, b = Regexp.last_match[1].chars
|
48
|
-
return r * 2 + g * 2 + b * 2
|
48
|
+
return (r * 2) + (g * 2) + (b * 2)
|
49
49
|
end
|
50
50
|
if val.match /\Argb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\Z/ # rubocop:disable Performance/RedundantMatch
|
51
51
|
r, g, b = Regexp.last_match[1..3].map { |v| v.to_i.to_s(16) }
|
data/lib/prawn_html/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prawn-html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattia Roccoberton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oga
|
@@ -83,7 +83,10 @@ files:
|
|
83
83
|
homepage: https://github.com/blocknotes/prawn-html
|
84
84
|
licenses:
|
85
85
|
- MIT
|
86
|
-
metadata:
|
86
|
+
metadata:
|
87
|
+
homepage_uri: https://github.com/blocknotes/prawn-html
|
88
|
+
source_code_uri: https://github.com/blocknotes/prawn-html
|
89
|
+
rubygems_mfa_required: 'true'
|
87
90
|
post_install_message:
|
88
91
|
rdoc_options: []
|
89
92
|
require_paths:
|
@@ -99,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
102
|
- !ruby/object:Gem::Version
|
100
103
|
version: '0'
|
101
104
|
requirements: []
|
102
|
-
rubygems_version: 3.1.
|
105
|
+
rubygems_version: 3.1.6
|
103
106
|
signing_key:
|
104
107
|
specification_version: 4
|
105
108
|
summary: Prawn PDF - HTML renderer
|