Add more logic to remove extra newlines (my rust sucks ik)
This commit is contained in:
parent
6cc62a000c
commit
5e95c5f8ff
1 changed files with 6 additions and 1 deletions
|
@ -26,7 +26,12 @@ fn main() {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.as_str()
|
.as_str()
|
||||||
.trim()
|
.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 description = &format_description!("[weekday] [month repr:long] [day] [year]");
|
||||||
let parsed_date = Date::parse(&format!("{} 2025", date), description).unwrap();
|
let parsed_date = Date::parse(&format!("{} 2025", date), description).unwrap();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue