lib/nanoc/extra/checking/checks/external_links.rb in nanoc-4.1.1 vs lib/nanoc/extra/checking/checks/external_links.rb in nanoc-4.1.2

- old
+ new

@@ -88,11 +88,11 @@ rescue URI::InvalidURIError return Result.new(href, 'invalid URI') end # Skip excluded URLs - return nil if self.excluded?(href) + return nil if excluded?(href) # Skip non-HTTP URLs return nil if url.scheme !~ /^https?$/ # Get status @@ -140,14 +140,15 @@ raise 'should not have gotten here' end end def path_for_url(url) - if url.path.nil? || url.path.empty? - path = '/' - else - path = url.path - end + path = + if url.path.nil? || url.path.empty? + '/' + else + url.path + end if url.query path << '?' << url.query end