nanoc-checking 1.0.4 → 1.0.5

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: b380e10a13a38c13d712399af8308a0cb67b533094287649eb30283fceba9be3
4
- data.tar.gz: bd6715348e5527f23bedf1812b56bc49d75e5827b5bb318a5165bf5cf689077f
3
+ metadata.gz: 1c6b1465b1a9ecccbc3535c98539c4caa56526f8ea5a02ae978bba6f5e7301e1
4
+ data.tar.gz: dd6a2ca940a81ba5706e2264df87029fc8a2a943036d2a5f5480098266dfb85c
5
5
  SHA512:
6
- metadata.gz: 61e31cc485a14e7a75199c65df33d172dd69caad7d00be40725ec55ca5203f052213846b974dd842be2a33d021d10be184a1266810f9fdcddf89db1a7def572d
7
- data.tar.gz: 2472f804af1d3facea1b840d89280070042b27fc03d91475b91db5e41a6783261a84ac62f83d6ea25811112ee85ff045e5a9110bc8ca398f08b4650dcfbc65ae
6
+ metadata.gz: e99b1d95e7c766af4122c3eb094e084c1c28f7b7545a2a83650e87f09ac68e33f00b72972bf000fef0c5567aa9e357d3057ca026aff15293b8af9061bfc85674
7
+ data.tar.gz: 73bd648e7069753428c69fcca5d0b73c94c2f85c8406952f9d40fe1ee50c4a4274f001fd9477c4be17abc59a0990e3924153e71afac5e03bd0d733f2c502a9d8
data/NEWS.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # nanoc-checking news
2
2
 
3
+ ## 1.0.5 (2024-04-21)
4
+
5
+ Fixes:
6
+
7
+ - Fixed support for paths with spaces in internal_links check (#1702)
8
+
3
9
  ## 1.0.4 (2024-04-19)
4
10
 
5
11
  Enhancements:
@@ -43,7 +43,8 @@ module Nanoc
43
43
 
44
44
  output_dir = @config.output_dir
45
45
  output_dir += '/' unless output_dir.end_with?('/')
46
- base_uri = URI("file://#{output_dir}")
46
+ # FIXME: escape is hacky
47
+ base_uri = URI("file://#{output_dir.gsub(' ', '%20')}")
47
48
  path = href.sub(/#{base_uri}/, '').sub(/file:\/{1,3}/, '')
48
49
 
49
50
  path = "/#{path}" unless path.start_with?('/')
@@ -83,7 +83,8 @@ module ::Nanoc
83
83
 
84
84
  def uris_in_file(filename, tag_names)
85
85
  uris = Set.new
86
- base_uri = URI("file://#{filename}")
86
+ # FIXME: escape is hacky
87
+ base_uri = URI("file://#{filename.gsub(' ', '%20')}")
87
88
  doc = Nokogiri::HTML(::File.read(filename))
88
89
  doc.traverse do |tag|
89
90
  next unless tag_names.nil? || tag_names.include?(tag.name)
@@ -116,7 +117,8 @@ module ::Nanoc
116
117
  uri
117
118
  else
118
119
  begin
119
- URI.join(base_uri, uri).to_s
120
+ # FIXME: escape is hacky
121
+ URI.join(base_uri, uri.gsub(' ', '%20')).to_s
120
122
  rescue
121
123
  uri
122
124
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nanoc
4
4
  module Checking
5
- VERSION = '1.0.4'
5
+ VERSION = '1.0.5'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-checking
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-19 00:00:00.000000000 Z
11
+ date: 2024-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nanoc-cli
@@ -83,7 +83,7 @@ licenses:
83
83
  - MIT
84
84
  metadata:
85
85
  rubygems_mfa_required: 'true'
86
- source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-checking-v1.0.4/nanoc-checking
86
+ source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-checking-v1.0.5/nanoc-checking
87
87
  post_install_message:
88
88
  rdoc_options: []
89
89
  require_paths: