mirror of
https://github.com/typst/typst
synced 2025-07-16 00:52:54 +08:00
multiple footers
This commit is contained in:
parent
74b1b10986
commit
cce5fe739a
@ -678,8 +678,8 @@ pub struct CellGrid<'a> {
|
||||
pub hlines: Vec<Vec<Line>>,
|
||||
/// The repeatable headers of this grid.
|
||||
pub headers: Vec<Repeatable<Header>>,
|
||||
/// The repeatable footer of this grid.
|
||||
pub footer: Option<Repeatable<Footer>>,
|
||||
/// The repeatable footers of this grid.
|
||||
pub footers: Vec<Repeatable<Footer>>,
|
||||
/// Whether this grid has gutters.
|
||||
pub has_gutter: bool,
|
||||
}
|
||||
@ -756,7 +756,7 @@ impl<'a> CellGrid<'a> {
|
||||
vlines,
|
||||
hlines,
|
||||
headers,
|
||||
footer,
|
||||
footers: footer.into_iter().collect(),
|
||||
has_gutter,
|
||||
}
|
||||
}
|
||||
@ -895,6 +895,11 @@ impl<'a> CellGrid<'a> {
|
||||
pub fn has_repeated_headers(&self) -> bool {
|
||||
self.headers.iter().any(|h| h.repeated)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn has_repeated_footers(&self) -> bool {
|
||||
self.footers.iter().any(|f| f.repeated)
|
||||
}
|
||||
}
|
||||
|
||||
/// Resolves and positions all cells in the grid before creating it.
|
||||
|
Loading…
x
Reference in New Issue
Block a user