Preserve inline emphasis in preprint title runs

This commit is contained in:
gloamxun committed 2026-10-19 17:12:23 +08:00
1 parent d211889e93
commit 1da9e0dde9
5 files changed
+26 -7

No files matched your search

+5 -2
View File
@@ -725,9 +725,12 @@ impl Parser {
self.metadata_capture = Some((active_field, runs));
return;
}
let value = runs.into_iter().map(|run| run.text).collect::<String>();
let value = runs.iter().map(|run| run.text.clone()).collect::<String>();
match field {
expanded::MetadataField::Title => self.document.title = value,
expanded::MetadataField::Title => {
self.document.title = value;
self.document.title_runs = runs;
}
expanded::MetadataField::Author => self.document.author = value,
expanded::MetadataField::Date => self.document.date = value,
}