mirror of
https://github.com/typst/typst
synced 2025-05-16 10:05:28 +08:00
fix gutter popping edge case
- With a header at the end, decrease the header row count for orphan prevention.
This commit is contained in:
parent
0c6fae92f0
commit
6b133dca3f
@ -1432,6 +1432,13 @@ impl<'a> GridLayouter<'a> {
|
||||
{
|
||||
// Remove the last row in the region if it is a gutter row.
|
||||
self.lrows.pop().unwrap();
|
||||
|
||||
if self.lrows.len() == self.current_header_rows {
|
||||
if self.current_header_rows == self.current_repeating_header_rows {
|
||||
self.current_repeating_header_rows -= 1;
|
||||
}
|
||||
self.current_header_rows -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
let footer_would_be_widow = if let Some(last_header_row) = self
|
||||
|
Loading…
x
Reference in New Issue
Block a user