Skip to content

Commit

Permalink
Fix Rubocop trailing / bug
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbayley committed Apr 27, 2022
1 parent e6cb1f1 commit a9fed40
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ def on_homepage_stanza(stanza)

return unless url&.match?(%r{^.+://[^/]+$})

domain = URI(url_node.str_content).host
domain = begin
URI(url_node.str_content).host
rescue URI::InvalidURIError
nil
end
return if domain.blank?

# This also takes URLs like 'https://example.org?path'
# and 'https://example.org#path' into account.
Expand Down

0 comments on commit a9fed40

Please sign in to comment.