Skip to content

Commit

Permalink
Fix inline comments for full internal path construction
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoporreca committed Mar 14, 2023
1 parent 6913d4e commit aba17cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/html_proofer/attribute/url.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ def full_path
return if path.nil? || path.empty?

base = if absolute_path?(path) # path relative to root
# either overwrite with root_dir; or, if source is directory, use that; or, just get the current file's dirname
# either overwrite with root_dir; or, if source is directory, use that; or, just get the source file's dirname
@runner.options[:root_dir] || (File.directory?(@source) ? @source : File.dirname(@source))
# relative links, path is a file
else
# path relative to the file where the link is defined
File.dirname(@filename)
end

Expand Down

0 comments on commit aba17cc

Please sign in to comment.