jekyll-embed-urls 0.5.12 → 0.5.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/embed.rb +4 -2
- 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: b37dd0e2524605ba192b934e51c69e045cd87f6b98fa77abcc6cb334eccfa9de
|
4
|
+
data.tar.gz: a279872e004fbd1f211ab1702b1552e3c0b565984f56f20deceb3ca992cb09df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e68304563ce6182e6620fce8513298dc7a5a6878cf069122e002299ee825014d9074a928be4109008a10a2499bb5b7164816b0919c959ec529f2dbddb3023369
|
7
|
+
data.tar.gz: d8e19c14418c85cd53aa77889aaa6e1acdd0e547d4fdb5943698386d2771f7126134daa94f7a3edc13a972680bab795f55df0c4034885f5f18be168ac3a38d94
|
data/lib/jekyll/embed.rb
CHANGED
@@ -153,7 +153,9 @@ module Jekyll
|
|
153
153
|
# @param [String] URL
|
154
154
|
# @return [String] HTML
|
155
155
|
def embed(url)
|
156
|
-
url.
|
156
|
+
raise URI::Error unless url.is_a? String
|
157
|
+
|
158
|
+
url = url.strip
|
157
159
|
|
158
160
|
# Quick check
|
159
161
|
raise URI::Error unless url.start_with? 'http'
|
@@ -212,7 +214,7 @@ module Jekyll
|
|
212
214
|
|
213
215
|
%w[image video audio].each do |attr|
|
214
216
|
page[attr] = ogp.public_send(:"#{attr}s").find do |a|
|
215
|
-
http?
|
217
|
+
a && a.url && http?(a.url)
|
216
218
|
end&.url
|
217
219
|
end
|
218
220
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-embed-urls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- f
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|