From 3830096c748bd26c8c2aeb906e8e63960f240567 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 29 Aug 2022 23:07:47 +0200 Subject: improve atom --- code/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'code/src/main.rs') diff --git a/code/src/main.rs b/code/src/main.rs index ed0a62a..693c120 100644 --- a/code/src/main.rs +++ b/code/src/main.rs @@ -84,7 +84,7 @@ fn article_metadata(path: PathBuf) -> ArticleMeta { let mut buf = String::new(); f.read_line(&mut buf).unwrap(); // assume the 1st line has the title ArticleMeta { - title: String::from(&buf[2..]), + title: String::from(buf[2..].trim()), filename: path.file_name().unwrap().to_str().unwrap().to_string(), date: iso8601::date(&path.file_name().unwrap().to_str().unwrap()[0..10]).unwrap(), path, -- cgit v1.2.3-70-g09d2