fix metadata parsing with strange whitespace
All checks were successful
ci/woodpecker/push/publish Pipeline was successful
All checks were successful
ci/woodpecker/push/publish Pipeline was successful
This commit is contained in:
parent
d6740851ec
commit
bfd8467d14
1 changed files with 1 additions and 1 deletions
|
@ -206,7 +206,7 @@ pub fn read_file(filename: &str, expected_file: TypeFileMetadata) -> Option<File
|
|||
|
||||
/// Deserialize metadata based on a type
|
||||
fn deserialize_metadata<T: Default + serde::de::DeserializeOwned>(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
|
||||
|
|
Loading…
Reference in a new issue