Skip to content

Commit

Permalink
Re-export BibliographyItem (typst#205)
Browse files Browse the repository at this point in the history
* Re-export `BibliographyItem`

* add docs to BibliographyItem

---------

Co-authored-by: PgBiel <9021226+PgBiel@users.noreply.github.com>
  • Loading branch information
2 people authored and danilasar committed Dec 31, 2024
1 parent fb0e3d5 commit 6bd1c10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/csl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1010,10 +1010,15 @@ pub struct RenderedBibliography {
pub items: Vec<BibliographyItem>,
}

/// A fully rendered bibliography item.
#[derive(Debug, Clone)]
pub struct BibliographyItem {
/// The item's key as specified in the bibliography.
pub key: String,
/// The item's first field. Only available when required by the
/// `second-field-align` CSL property.
pub first_field: Option<ElemChild>,
/// The rendered item.
pub content: ElemChildren,
}

Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ use std::collections::BTreeMap;
pub use crate::csl::archive;
pub use citationberg;
pub use csl::{
standalone_citation, BibliographyDriver, BibliographyRequest, Brackets,
BufWriteFormat, CitationItem, CitationRequest, CitePurpose, Elem, ElemChild,
ElemChildren, ElemMeta, Formatted, Formatting, LocatorPayload, Rendered,
standalone_citation, BibliographyDriver, BibliographyItem, BibliographyRequest,
Brackets, BufWriteFormat, CitationItem, CitationRequest, CitePurpose, Elem,
ElemChild, ElemChildren, ElemMeta, Formatted, Formatting, LocatorPayload, Rendered,
RenderedBibliography, RenderedCitation, SpecificLocator,
};
pub use selectors::{Selector, SelectorError};
Expand Down

0 comments on commit 6bd1c10

Please sign in to comment.