jekyll_href 1.0.4 → 1.0.7

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
  SHA256:
3
- metadata.gz: 2ac9c9737cba4b3509c84de7b06da21041b839db280cb8cbc77310252939974e
4
- data.tar.gz: cad78f098ac87ff61d41761aabd36a2b048c3169270ff1d188eeb5deedd2ac7c
3
+ metadata.gz: 838cadb39ae8e31f560af6c84010e03e2f79770c46dc2002751e39ffc9173a40
4
+ data.tar.gz: a6fc7f1c32e794e625f643c9ba6dd5943e0417699f1020d18eee9d9ce6062585
5
5
  SHA512:
6
- metadata.gz: 68fbfaed3a11ff94d8fe24e3175cb71d4735e3f22e89ac044a1c8e3d205c59fa5d3e6bfb11e4c182caa889cb69ad3f840782bac0c810d07dc26f3891e7997e49
7
- data.tar.gz: 888345783992115409644792d18c02a32a076ab8a6d150b59ee9c4cfd9e7a207fb442d6ddf1efc220568f148ce40a176c4818a6019fbf307ec80988c92bf2ba0
6
+ metadata.gz: 10b5ed831641ff8e3b8cfa0994c9555dcef27eb27c4d3a72814cb867d3401623f7142c923ac2f0358cfe5dfd41cc843247bda4ea421daaf8ec8f1abdeab43a10
7
+ data.tar.gz: 91fd8a125ea762140ba0047d7aeabdb9325f9914809b08c9aa9490fe1a806ff7ec3b4eb2b2791a75816efc0b7d36ea3da8efaa67b8087d7abed0e8af7f2c662f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 1.0.7 / 2022-04-11
2
+ * Fixed bad reference when more than one URL matches
3
+
4
+ ## 1.0.6 / 2022-04-05
5
+ * Updated to `jekyll_plugin_logger` v2.1.0
6
+
7
+ ## 1.0.5 / 2022-03-28
8
+ * Fixed problem with URI rendering
9
+
1
10
  ## 1.0.4 / 2022-03-28
2
11
  * Fixed problem with `match` option
3
12
 
data/jekyll_href.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.required_ruby_version = ">= 2.6.0"
32
32
  spec.summary = "Generates an 'a href' tag, possibly with target='_blank' and rel='nofollow'."
33
33
  spec.test_files = spec.files.grep(%r!^(test|spec|features)/!)
34
- spec.version = JekyllHref::VERSION
34
+ spec.version = JekyllHrefVersion::VERSION
35
35
 
36
36
  spec.add_dependency 'jekyll', '>= 3.5.0'
37
37
  spec.add_dependency 'jekyll_plugin_logger'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module JekyllHref
4
- VERSION = "1.0.4"
3
+ module JekyllHrefVersion
4
+ VERSION = "1.0.7"
5
5
  end
data/lib/jekyll_href.rb CHANGED
@@ -62,7 +62,7 @@ class ExternalHref < Liquid::Tag
62
62
  @tokens = command_line.strip.split
63
63
  @follow = get_value("follow", " rel='nofollow'")
64
64
  @target = get_value("notarget", " target='_blank'")
65
- @logger = PluginMetaLogger.instance.new_logger(self)
65
+ @logger = PluginMetaLogger.instance.new_logger(self, PluginMetaLogger.instance.config)
66
66
 
67
67
  match_index = @tokens.index("match")
68
68
  if match_index
@@ -91,7 +91,7 @@ class ExternalHref < Liquid::Tag
91
91
 
92
92
  @text = tokens.join(" ").strip
93
93
  if @text.empty?
94
- @text = "<code>${@link}</code>"
94
+ @text = "<code>#{@link}</code>"
95
95
  @link = "https://#{@link}"
96
96
  end
97
97
 
@@ -134,7 +134,7 @@ class ExternalHref < Liquid::Tag
134
134
  @link = posts.first.url
135
135
  @link = "#{@link}\##{fragment}" if fragment
136
136
  else
137
- abort "Error: More than one url matched: #{ matches.join(", ")}"
137
+ abort "Error: More than one url matched: #{ posts.map(&:relative_path).join(", ")}"
138
138
  end
139
139
  end
140
140
 
@@ -148,5 +148,5 @@ class ExternalHref < Liquid::Tag
148
148
  end
149
149
  end
150
150
 
151
- PluginMetaLogger.instance.info { "Loaded jeykll_href v#{JekyllHref::VERSION} plugin." }
151
+ PluginMetaLogger.instance.info { "Loaded jeykll_href v#{JekyllHrefVersion::VERSION} plugin." }
152
152
  Liquid::Template.register_tag('href', ExternalHref)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_href
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Slinn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-28 00:00:00.000000000 Z
11
+ date: 2022-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll