summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPgBiel <9021226+PgBiel@users.noreply.github.com>2025-03-03 19:59:41 -0300
committerPgBiel <9021226+PgBiel@users.noreply.github.com>2025-06-28 22:39:35 -0300
commitcce5fe739a0d476b6d54ae7cd9385a2313eb639e (patch)
treee2e7ec71615a22aaa4359f4c5efa099e03b72d05
parent74b1b109865f5a8c141bbc711de6960844b8949d (diff)
multiple footers
-rw-r--r--crates/typst-library/src/layout/grid/resolve.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/crates/typst-library/src/layout/grid/resolve.rs b/crates/typst-library/src/layout/grid/resolve.rs
index baf6b738..42df8953 100644
--- a/crates/typst-library/src/layout/grid/resolve.rs
+++ b/crates/typst-library/src/layout/grid/resolve.rs
@@ -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.