jekyll-embed-urls 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll/embed/content.rb +4 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 214ec59b13ace086962b66c686ed56739a914773df1953f863fadaae1cc637b1
4
- data.tar.gz: 7ad21fce1c1e5b6bedb59acb74c8454f6c25a9b56edb0c0009d63430e440bc6e
3
+ metadata.gz: bf83c997e61bc80c849cede54bbd5acbc396ea050625816c7bdca3bb04d3cca5
4
+ data.tar.gz: 33bc4f1c0f1279eb41df3e30c9d9c0e8d60177a1a47fa5be2b1d339641bf7e49
5
5
  SHA512:
6
- metadata.gz: 4cb5c6c3b3c68d64953548a5b15428427d3bffe5065382bbc00536386edf377aaa00154bb008009dca467dcca47e1c16b22e20ecc74af15648683965c3e2d770
7
- data.tar.gz: cda3db036365ce8c06b942038fe9cd80da91fa330e63521209d1ebcc8c8a351299b5ae1a99df3670b3efdef01210944c4a7d8e12c7120f6d18b16af96a7bfb90
6
+ metadata.gz: 6d55b3655e34c323628a22d31ebd53224eb23538e3e1f4c0caf2f2670bd67e70bd49adae7315d170642c274719feb3ef5d33bc11a88ec074f3e1d8b50d7f5b62
7
+ data.tar.gz: d362fdcb2bf28d64bec1bd08eceaac38fad91c70a3fccea16a6322ab87e3511b361560fba14fa8d4ae3b37e845a27bc32c68f3d650e7937c90f85e29003dda3b
@@ -5,17 +5,17 @@ require 'cgi'
5
5
  module Jekyll
6
6
  class Embed
7
7
  class Content
8
- URL_RE = /<p[^>]*>[\s\n]*(?<url>https?:\/\/[^<\s\n]+)[\s\n]*<\/p>/m.freeze
8
+ URL_RE = /(<p[^>]*>[\s\n]*(https?:\/\/[^<\s\n]+)[\s\n]*<\/p>)/m.freeze
9
9
 
10
10
  class << self
11
11
  # Find URLs on paragraphs. We do it after rendering because
12
12
  # sometimes we use HTML instead of pure Markdown and this way we
13
13
  # catch both.
14
14
  def embed!(content)
15
- URL_RE.match(content) do |match|
16
- embed = Jekyll::Embed.embed CGI.unescapeHTML(match[:url])
15
+ content.scan(URL_RE) do |p, url|
16
+ embed = Jekyll::Embed.embed CGI.unescapeHTML(url)
17
17
 
18
- content.sub! URL_RE, embed
18
+ content.sub! p, embed
19
19
  end
20
20
  end
21
21
  end
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.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-18 00:00:00.000000000 Z
11
+ date: 2022-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll