Fix code style.

This commit is contained in:
Markus Reiter 2020-12-14 04:35:26 +01:00 committed by Sam Ford
parent cf40f7b8f6
commit 82535696fa
No known key found for this signature in database
GPG Key ID: 95209E46C7FFDEFE

View File

@ -23,10 +23,10 @@ module Homebrew
def self.match?(url)
return false unless url.match?(%r{^https?://})
xml = url.end_with?('.xml')
xml = url.end_with?(".xml")
xml ||= begin
headers = Strategy.page_headers(url)
content_type = headers["content-type"]&.split(';', 2)&.first
content_type = headers["content-type"]&.split(";", 2)&.first
["application/xml", "text/xml"].include?(content_type)
end
return false unless xml