Skip to content

Commit

Permalink
fix 'hayagriva cite' command
Browse files Browse the repository at this point in the history
  • Loading branch information
PgBiel committed Oct 1, 2024
1 parent cdfb93f commit b37cb54
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,24 +402,22 @@ fn main() {

for row in driver
.finish(BibliographyRequest::new(&style, locale, &locales))
.bibliography
.map(|b| b.items)
.unwrap_or_default()
.citations
{
let alternate = matches.get_flag("no-fmt");

if let Some(prefix) = row.first_field {
if let Some(note_number) = row.note_number {
if alternate {
println!("{:#}", prefix)
println!("{:#}", note_number)
} else {
println!("{}", prefix)
println!("{}.", note_number)
}
}

if alternate {
println!("{:#}", row.content)
println!("{:#}", row.citation)
} else {
println!("{}", row.content)
println!("{}", row.citation)
}
}
}
Expand Down

0 comments on commit b37cb54

Please sign in to comment.