Allow documents to replace the title block
This commit is contained in:
1 parent
23cf1f13de
commit
5e9552d785
8 files changed
+89
-18
No files matched your search
@@ -910,6 +910,14 @@ impl Parser {
|
||||
self.push_block(Block::FramedBox { runs, frame, width });
|
||||
}
|
||||
}
|
||||
expanded::FrontendEventKind::MetadataValue(field) => {
|
||||
let value = match field {
|
||||
expanded::MetadataField::Title => self.document.title.clone(),
|
||||
expanded::MetadataField::Author => self.document.author.clone(),
|
||||
expanded::MetadataField::Date => self.document.date.clone(),
|
||||
};
|
||||
self.append_text(&value);
|
||||
}
|
||||
expanded::FrontendEventKind::MetadataStart(field) => {
|
||||
self.metadata_capture = Some((*field, Vec::new()));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user