diff --git a/src/main.rs b/src/main.rs index 4693652..4f8f656 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,12 @@ fn main() { .unwrap() .as_str() .trim() - .replace("\n\n", "\n"); + .to_string(); + + let announcements = Regex::new(r"\n+") + .unwrap() + .replace_all(&announcements, "\n") + .to_string(); let description = &format_description!("[weekday] [month repr:long] [day] [year]"); let parsed_date = Date::parse(&format!("{} 2025", date), description).unwrap();