Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoporreca committed Jan 9, 2022
1 parent b9a5cd1 commit 287bd2d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/html_proofer/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,18 @@ def detect_url_changes(urls_detected, type)
if @cache_log[type].include?(url)

# if this is false, we're trying again
if type == :external
found = @cache_log[type][url][:found]
found = if type == :external
@cache_log[type][url][:found]
else
@cache_log[type][url][:metadata].all? { |m| m[:found] }
end
if found
# update the cached metadata (there might be more locations found cached for the link)
@cache_log[type][url][:metadata] = metadata
else
found = @cache_log[type][url][:metadata].all? { |m| m[:found] }
end
if not found
@logger.log :debug, "Re-adding not found #{url} to #{type} cache"
# metadata will be updated when re-adding the url, and must be re-intialized for internal links
@cache_log[type][url][:metadata] = []
else
# update the cached metadata (there might be more locations found cached for the link)
@cache_log[type][url][:metadata] = metadata
end
found
else
Expand Down

0 comments on commit 287bd2d

Please sign in to comment.