From 2de6d96a10f00f6dc828711166a53b768f97bbab Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 22 Jan 2017 21:56:54 +0100 Subject: [PATCH] Change regex to catch multi-line `pubDate` tags. --- Library/Homebrew/cask/lib/hbc/dsl/appcast.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Library/Homebrew/cask/lib/hbc/dsl/appcast.rb b/Library/Homebrew/cask/lib/hbc/dsl/appcast.rb index 94660e9366..e27870622c 100644 --- a/Library/Homebrew/cask/lib/hbc/dsl/appcast.rb +++ b/Library/Homebrew/cask/lib/hbc/dsl/appcast.rb @@ -15,11 +15,7 @@ module Hbc result = SystemCommand.run("/usr/bin/curl", args: ["--compressed", "--location", "--user-agent", URL::FAKE_USER_AGENT, @uri], print_stderr: false) checkpoint = if result.success? - processed_appcast_text = result.stdout.gsub(%r{[^<]*}, "") - - # This step is necessary to replicate running `sed` from the command line - processed_appcast_text << "\n" unless processed_appcast_text.end_with?("\n") - + processed_appcast_text = result.stdout.gsub(%r{[^<]*}m, "") Digest::SHA2.hexdigest(processed_appcast_text) end