diff options
Diffstat (limited to 'src/ast.rs')
-rw-r--r-- | src/ast.rs | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -285,7 +285,7 @@ pub enum Error { pub struct YamlMetadata { title: String, subtitle: Option<String>, - author: Option<String>, + authors: Option<Vec<String>>, date: Option<String>, classes: Option<Vec<String>>, bibliography: Option<Vec<PathBuf>>, @@ -320,8 +320,12 @@ impl YamlMetadata { map.insert("subtitle".into(), meta_string(v)); } - if let Some(v) = &self.author { - map.insert("author".into(), meta_string(v)); + if let Some(authors) = &self.authors { + let authors: Vec<MetaValue> = authors + .iter() + .map(|s| MetaValue::MetaString(s.into())) + .collect(); + map.insert("author".into(), MetaValue::MetaList(authors)); } if let Some(v) = &self.date { |