summaryrefslogtreecommitdiff
path: root/src/ast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast.rs')
-rw-r--r--src/ast.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ast.rs b/src/ast.rs
index ceded5c..15843eb 100644
--- a/src/ast.rs
+++ b/src/ast.rs
@@ -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 {