fix footer progression

This commit is contained in:
PgBiel 2025-05-21 01:11:30 -03:00
parent 58db042ff3
commit 9422ecc74a
2 changed files with 5 additions and 1 deletions

View File

@ -317,10 +317,11 @@ impl<'a> GridLayouter<'a> {
} }
} }
if let Some(next_footer) = self.upcoming_footers.first() { if let [next_footer, other_footers @ ..] = self.upcoming_footers {
// TODO(subfooters): effective range (consider gutter before // TODO(subfooters): effective range (consider gutter before
// if it was removed) // if it was removed)
if next_footer.range().contains(&y) { if next_footer.range().contains(&y) {
self.upcoming_footers = other_footers;
self.place_new_footer(engine, next_footer)?; self.place_new_footer(engine, next_footer)?;
self.flush_orphans(); self.flush_orphans();
y = next_footer.end; y = next_footer.end;

View File

@ -567,6 +567,9 @@ impl<'a> GridLayouter<'a> {
0, 0,
)?; )?;
self.repeating_footers
.extend(next_repeating_footers.iter().filter_map(Repeatable::as_repeated));
Ok(()) Ok(())
} }