From 3de1237f54d1d61f1d7a70f22c69aafae1d178b1 Mon Sep 17 00:00:00 2001 From: PgBiel <9021226+PgBiel@users.noreply.github.com> Date: Wed, 21 May 2025 00:52:44 -0300 Subject: [PATCH] temporary workaround for footer lines --- crates/typst-layout/src/grid/lines.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/typst-layout/src/grid/lines.rs b/crates/typst-layout/src/grid/lines.rs index d5da7e263..973f0d21c 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) =