jekyll-crosspost-to-medium 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e83640baadbb7b239e6f6dcff6c03e2403849d47
4
- data.tar.gz: eee586a530345029b70e8281d69ef60aea891def
3
+ metadata.gz: cef45f1dd83263ecd92c563e365a7fe97fcf13f5
4
+ data.tar.gz: ff030a5b67b2d45f02f1f975c8e3a18bc1b0be5c
5
5
  SHA512:
6
- metadata.gz: 08232d2c5642cfe4681962d9a2ae3e2edbd47f142e886a826b2e885851525a25386e998e73c998b6d02a797127ab1a5d93a4077a9b407746abf99ba8f31895a8
7
- data.tar.gz: afa5471f52e0b9014287d2f530135536426fd7674c403d75bc8c8fb9beb3a15456fabf531afa41aec0d6d9761a38f6a05a3d16e6f1c970f435a62c7095ebc6b1
6
+ metadata.gz: 337b95762533b5e480699b6ff0882b024b0af099329332e49c691e202f3fef842678c21b7b34b7e98a896eef9869801096e13c7077017907473c6e7a4512a7c0
7
+ data.tar.gz: 56c931b4d441e57fb3ea81b11390bd267e827ec018a279283d70f24adcabf62e648ece1700b417be21661ee922318d92c355af09466e7cc3f81fac918f35229d
@@ -121,8 +121,9 @@ module Jekyll
121
121
 
122
122
  def crosspost_payload(crossposted, post, content, title, url)
123
123
  # Update any absolute URLs
124
- content = content.gsub /href=(["'])\//, "href=\"\1#{@site.config['url']}/"
125
- content = content.gsub /src=(["'])\//, "src=\"\1#{@site.config['url']}/"
124
+ # But don’t clobber protocol-less (i.e. "//") URLs
125
+ content = content.gsub /href=(["'])\/(?!\/)/, "href=\"\1#{@site.config['url']}/"
126
+ content = content.gsub /src=(["'])\/(?!\/)/, "src=\"\1#{@site.config['url']}/"
126
127
 
127
128
  # Save canonical URL
128
129
  canonical_url = url
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-crosspost-to-medium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Gustafson