lib/nanoc/extra/checking/checks/internal_links.rb in nanoc-4.1.1 vs lib/nanoc/extra/checking/checks/internal_links.rb in nanoc-4.1.2
- old
+ new
@@ -32,11 +32,11 @@
# Skip hrefs that point to self
# FIXME: this is ugly and won’t always be correct
return true if href == '.'
# Skip hrefs that are specified in the exclude configuration
- return true if self.excluded?(href)
+ return true if excluded?(href)
# Remove target
path = href.sub(/#.*$/, '')
return true if path.empty?
@@ -46,14 +46,15 @@
# Decode URL (e.g. '%20' -> ' ')
path = URI.unescape(path)
# Make absolute
- if path[0, 1] == '/'
- path = @config[:output_dir] + path
- else
- path = ::File.expand_path(path, ::File.dirname(origin))
- end
+ path =
+ if path[0, 1] == '/'
+ @config[:output_dir] + path
+ else
+ ::File.expand_path(path, ::File.dirname(origin))
+ end
# Check whether file exists
return true if File.file?(path)
# Check whether directory with index file exists