summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/typst-layout/src/grid/lines.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/typst-layout/src/grid/lines.rs b/crates/typst-layout/src/grid/lines.rs
index d5da7e26..973f0d21 100644
--- a/crates/typst-layout/src/grid/lines.rs
+++ b/crates/typst-layout/src/grid/lines.rs
@@ -512,15 +512,18 @@ pub fn hline_stroke_at_column(
);
// Prioritize the footer's top stroke as well where applicable.
+ // TODO(subfooters): do this properly (store footer rows)
let bottom_stroke_comes_from_footer = grid
- .footer
- .as_ref()
+ .footers
+ .last()
.and_then(Repeatable::as_repeated)
.is_some_and(|footer| {
// Ensure the row below us is a repeated footer.
// FIXME: Make this check more robust when footers at arbitrary
// positions are added.
- local_top_y.unwrap_or(0) + 1 < footer.start && y >= footer.start
+ footer.end == grid.rows.len()
+ && local_top_y.unwrap_or(0) + 1 < footer.start
+ && y >= footer.start
});
let (prioritized_cell_stroke, deprioritized_cell_stroke) =