From aac1423638cbee0732a922a7952762028349dbdb Mon Sep 17 00:00:00 2001 From: ultrablob Date: Tue, 22 Apr 2025 17:16:56 -0400 Subject: [PATCH] fix regex (i have no clue why this works) --- src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 4f8f656..5e24d27 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,9 +28,9 @@ fn main() { .trim() .to_string(); - let announcements = Regex::new(r"\n+") + let pretty_announcements = Regex::new("\\n+") .unwrap() - .replace_all(&announcements, "\n") + .replace_all(&announcements, "") .to_string(); let description = &format_description!("[weekday] [month repr:long] [day] [year]"); @@ -42,8 +42,10 @@ fn main() { return; } + // println!("{}", pretty_announcements); + Webhook::new(webhook) - .content(&format!("## {}:\n{}", date, announcements)) + .content(&format!("## {}:\n{}", date, pretty_announcements)) .send() .unwrap(); }