From d8b50094e7d5ce5d0fb21a49732f012054504372 Mon Sep 17 00:00:00 2001 From: nullchinchilla Date: Mon, 23 Dec 2024 10:45:02 -0500 Subject: [PATCH] Fix text cleaning in get_raw_announcements by adjusting regex replacement target --- src/announcements.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/announcements.rs b/src/announcements.rs index 5e2d6e7..5a018dd 100644 --- a/src/announcements.rs +++ b/src/announcements.rs @@ -15,7 +15,7 @@ async fn get_raw_announcements() -> anyhow::Result> { for chunk in resp.split("---") { let captures = re.captures(chunk).context("missing date string")?; let date_str = captures.get(1).context("missing capture in date string")?; - let cleaned_text = re.replace(&resp, ""); + let cleaned_text = re.replace(chunk, ""); v.push((date_str.as_str().to_string(), cleaned_text.to_string())); } Ok(v)