summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-01-09 23:43:43 -0800
committerFuwn <[email protected]>2024-01-09 23:43:43 -0800
commit18ba9dddd6e7f4b236f69c4084e8e15ca840ac90 (patch)
tree2ae3be4f9f5c295711a5d4fb80632955ae66cd55
parentfeat: initial release (diff)
downloadrin-18ba9dddd6e7f4b236f69c4084e8e15ca840ac90.tar.xz
rin-18ba9dddd6e7f4b236f69c4084e8e15ca840ac90.zip
feat(schedule): lowercase weekdays
-rw-r--r--src/schedule.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/schedule.rs b/src/schedule.rs
index c6836cc..c39875f 100644
--- a/src/schedule.rs
+++ b/src/schedule.rs
@@ -165,7 +165,13 @@ pub async fn render_markdown(schedule: &MarkdownMap) {
lines.push_str(&format!("{day}\n\n"));
- for line in schedule.get(&day).unwrap() {
+ for line in schedule
+ .iter()
+ .map(|(k, v)| (k.to_lowercase(), v.clone()))
+ .collect::<MarkdownMap>()
+ .get(&day.to_lowercase())
+ .unwrap()
+ {
lines.push_str(line);
lines.push('\n');
}