fix regex (i have no clue why this works)
This commit is contained in:
parent
5e95c5f8ff
commit
aac1423638
1 changed files with 5 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue