class HTML::Proofer::Checkable

def file_path

def file_path
  return if path.nil?
  if path =~ /^\// #path relative to root
    base = @check.src
  elsif File.exist? File.expand_path path, @check.src #relative links, path is a file
    base = File.dirname @check.path
  else #relative link, path is a directory
    base = @check.path
  end
  file = File.join base, path
  # implicit /index.html support, with support for tailing slashes
  file = File.join path, "index.html" if File.directory? File.expand_path file, @check.src
  file
end