Skip to content
Snippets Groups Projects
Commit 2de6d96a authored by Markus Reiter's avatar Markus Reiter
Browse files

Change regex to catch multi-line `pubDate` tags.

parent 16f4130d
No related branches found
No related tags found
No related merge requests found
......@@ -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{<pubDate>[^<]*</pubDate>}, "")
# 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{<pubDate>[^<]*</pubDate>}m, "")
Digest::SHA2.hexdigest(processed_appcast_text)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment