Skip to content

Commit

Permalink
Fix text cleaning in get_raw_announcements by adjusting regex replace…
Browse files Browse the repository at this point in the history
…ment target
  • Loading branch information
nullchinchilla committed Dec 23, 2024
1 parent 6fcd881 commit d8b5009
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/announcements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn get_raw_announcements() -> anyhow::Result<Vec<(String, String)>> {
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)
Expand Down

0 comments on commit d8b5009

Please sign in to comment.