diff options
Diffstat (limited to 'code/src/main.rs')
-rw-r--r-- | code/src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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, |