Skip to content

Commit

Permalink
Fix regression introduced in #174
Browse files Browse the repository at this point in the history
  • Loading branch information
reknih committed Oct 1, 2024
1 parent 9fb18f8 commit d9c7a1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions src/interop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,14 @@ impl TryFrom<&tex::Entry> for Entry {
item.add_affiliated_persons((a, PersonRole::Introduction));
}

if let Some(title) = map_res(entry.title())?.map(Into::<ChunkedString>::into) {
if let Some(short_title) =
map_res(entry.short_title())?.map(Into::<ChunkedString>::into)
{
item.set_title(FormatString::with_short(title, short_title));
if let Some(title) = map_res(entry.title())?.map(Into::into) {
if let Some(short_title) = map_res(entry.short_title())?.map(Into::into) {
item.set_title(FormatString {
value: title,
short: Some(Box::new(short_title)),
});
} else {
item.set_title(FormatString::with_value(title));
item.set_title(FormatString { value: title, short: None });
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ let result = driver.finish(BibliographyRequest {
});
for cite in result.citations {
println!("{}", cite.citation.to_string())
println!("{}", cite.citation)
}
```
Expand Down

0 comments on commit d9c7a1e

Please sign in to comment.