From bfd8467d14285b3b47fb200f7f08a39304f1a29e Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 22 Dec 2023 15:57:30 +0100 Subject: [PATCH] fix metadata parsing with strange whitespace --- src/misc/markdown.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/markdown.rs b/src/misc/markdown.rs index 9a08fab..91af1ef 100644 --- a/src/misc/markdown.rs +++ b/src/misc/markdown.rs @@ -206,7 +206,7 @@ pub fn read_file(filename: &str, expected_file: TypeFileMetadata) -> Option(text: &str) -> T { - serde_yaml::from_str(text.trim_matches(&['-', '\n'] as &[_])).unwrap_or_default() + serde_yaml::from_str(text.trim().trim_matches(&['-'] as &[_])).unwrap_or_default() } /// Fetch metadata from AST