diff --git a/crates/typst-library/src/layout/grid/resolve.rs b/crates/typst-library/src/layout/grid/resolve.rs index acb588e95..78f5cd42f 100644 --- a/crates/typst-library/src/layout/grid/resolve.rs +++ b/crates/typst-library/src/layout/grid/resolve.rs @@ -445,7 +445,7 @@ pub struct Header { } /// A repeatable grid footer. Stops at the last row. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Footer { /// The first row included in this footer. pub start: usize, @@ -470,6 +470,7 @@ impl Footer { /// It still exists even when not repeatable, but must not have additional /// considerations by grid layout, other than for consistency (such as making /// a certain group of rows unbreakable). +#[derive(Debug, Clone)] pub struct Repeatable { inner: T, @@ -763,7 +764,8 @@ impl<'a> CellGrid<'a> { vlines, hlines, headers, - footers: footer.into_iter().collect(), + footers, + sorted_footers, has_gutter, } } @@ -2406,11 +2408,9 @@ fn skip_auto_index_through_fully_merged_rows( /// at which they start repeating. When a new footer is about to be laid out, /// conflicting footers which come before it in this vector must stop /// repeating. -fn simulate_footer_repetition( - footers: &[Repeatable