jekyll_href 1.2.10 → 1.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +7 -1
- data/lib/hash_array.rb +1 -1
- data/lib/href_match.rb +1 -1
- data/lib/href_page_title.rb +1 -1
- data/lib/href_private.rb +2 -2
- data/lib/href_summary.rb +1 -1
- data/lib/href_summary_tag.rb +3 -5
- data/lib/href_tag.rb +6 -5
- data/lib/jekyll_href/version.rb +1 -1
- data/lib/jekyll_href.rb +1 -4
- 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: 79cf3cccc7fc8072d6b2f7ae73d59845633f48026e0d0923d9749fbdcdd75ddf
|
4
|
+
data.tar.gz: 3e93f0d18068f86997210ddd93a3d90f899f28d82dd130c08177f4c70915e315
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acafa56a136b24199a00febabfc2ff420974ae0d3e09eb6a772ce482691adc1709a765cc7a8e78ce7160eff6c819da8e72350c52160a8dc0c615cef4ee4063dc
|
7
|
+
data.tar.gz: c0c4e34adb9ef314b270f742860ee52ddcc82855f031693233ae8516d69e86c107bd0ed415958a872356e52e3afae58f5e82c53a4d43d5a8ae03a992b7f53adb
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,15 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
3
|
|
4
|
+
## 1.2.11 / 2024-07-27
|
5
|
+
|
6
|
+
* Fixed an unqualified reference to `JekyllPluginHelper`.
|
7
|
+
* Shortened the very long stack dump for an error condition.
|
8
|
+
|
9
|
+
|
4
10
|
## 1.2.10 / 2024-07-23
|
5
11
|
|
6
|
-
* Make compatible with jekyll_plugin_support 1.0.0
|
12
|
+
* Make compatible with `jekyll_plugin_support` 1.0.0
|
7
13
|
|
8
14
|
|
9
15
|
## 1.2.9 / 2024-07-17
|
data/lib/hash_array.rb
CHANGED
@@ -6,7 +6,7 @@ module HashArray
|
|
6
6
|
|
7
7
|
def add_link_for_page(href, hash)
|
8
8
|
enclosing_page = href.path
|
9
|
-
hash[enclosing_page] = []
|
9
|
+
hash[enclosing_page] = hash[enclosing_page] || []
|
10
10
|
pre_existing = hash[enclosing_page].find { |h| h.link_save == href.link_save }
|
11
11
|
if pre_existing
|
12
12
|
if pre_existing.follow != href.follow
|
data/lib/href_match.rb
CHANGED
data/lib/href_page_title.rb
CHANGED
data/lib/href_private.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module JekyllSupport
|
2
2
|
class HRefTag
|
3
3
|
private
|
4
4
|
|
@@ -25,7 +25,7 @@ module MSlinn
|
|
25
25
|
No URL was provided on #{@path}:#{@line_number} (after front matter).
|
26
26
|
<pre>{% href #{@argument_string.strip} %}</pre>
|
27
27
|
END_MESSAGE
|
28
|
-
@logger.error { JekyllPluginHelper.remove_html_tags msg.strip }
|
28
|
+
@logger.error { JekyllSupport::JekyllPluginHelper.remove_html_tags msg.strip }
|
29
29
|
"<div class='href_error'>HRefError: #{msg}</div>"
|
30
30
|
end
|
31
31
|
|
data/lib/href_summary.rb
CHANGED
data/lib/href_summary_tag.rb
CHANGED
@@ -2,10 +2,8 @@ require 'jekyll_plugin_logger'
|
|
2
2
|
require 'jekyll_plugin_support'
|
3
3
|
require_relative 'jekyll_href/version'
|
4
4
|
|
5
|
-
module
|
6
|
-
class HrefSummary <
|
7
|
-
include JekyllHrefVersion
|
8
|
-
|
5
|
+
module JekyllSupport
|
6
|
+
class HrefSummary < JekyllTag
|
9
7
|
# Class instance variables accumulate hrefs across invocations.
|
10
8
|
# These are hashes of arrays;
|
11
9
|
# the hash keys are page paths (strings) and the hash values are arrays of HRefTags.
|
@@ -85,6 +83,6 @@ module MSlinn
|
|
85
83
|
END_RENDER
|
86
84
|
end
|
87
85
|
|
88
|
-
|
86
|
+
JekyllSupport::JekyllPluginHelper.register(self, 'href_summary')
|
89
87
|
end
|
90
88
|
end
|
data/lib/href_tag.rb
CHANGED
@@ -11,13 +11,13 @@ require_relative 'hash_array'
|
|
11
11
|
# @license SPDX-License-Identifier: Apache-2.0
|
12
12
|
# Generates an href.
|
13
13
|
|
14
|
-
module
|
14
|
+
module JekyllSupport
|
15
15
|
MiniHref = Struct.new(:follow, :html, :link, :line_number, :link_save, :path, :summary_exclude, :summary_href, keyword_init: true)
|
16
16
|
|
17
17
|
HRefError = JekyllSupport.define_error
|
18
18
|
|
19
19
|
# Implements href Jekyll tag
|
20
|
-
class HRefTag <
|
20
|
+
class HRefTag < JekyllTag
|
21
21
|
attr_reader :follow, :helper, :line_number, :link_save, :match, :page, :path, :site,
|
22
22
|
:summary, :summary_exclude, :summary_href, :target, :text, :url
|
23
23
|
attr_accessor :link
|
@@ -47,14 +47,15 @@ module MSlinn
|
|
47
47
|
@helper_save = @helper.clone
|
48
48
|
globals_update(@helper.argv, linkk) # Sets @link and @text, might clear @follow and @target
|
49
49
|
handle_match(@link) if @match
|
50
|
-
raise HrefError,
|
50
|
+
raise HrefError, '@link_type was not set' if @link_type == LinkType::UNKNOWN
|
51
51
|
|
52
52
|
save_summary
|
53
53
|
klass = " class='#{@klass}'" if @klass
|
54
54
|
style = " style='#{@style}'" if @style
|
55
55
|
"<a href='#{@link}'#{klass}#{style}#{@target}#{@follow}>#{@text}</a>"
|
56
56
|
rescue HRefError => e # jekyll_plugin_support handles StandardError
|
57
|
-
msg = format_error_message
|
57
|
+
msg = format_error_message e.message
|
58
|
+
msg = "#{msg}\n<pre> {% href #{@argument_string.strip} %}</pre>"
|
58
59
|
@text = "<div class='href_error'>#{msg}</div>"
|
59
60
|
e.shorten_backtrace
|
60
61
|
@logger.error "#{e.class} raised #{msg}"
|
@@ -68,7 +69,7 @@ module MSlinn
|
|
68
69
|
"On line #{line_number} of #{path}: #{follow} #{match} #{target} #{link} => '#{text}'"
|
69
70
|
end
|
70
71
|
|
71
|
-
|
72
|
+
JekyllSupport::JekyllPluginHelper.register(self, 'href')
|
72
73
|
end
|
73
74
|
end
|
74
75
|
|
data/lib/jekyll_href/version.rb
CHANGED
data/lib/jekyll_href.rb
CHANGED
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.2.
|
4
|
+
version: 1.2.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Slinn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ipaddress
|