From fe08df8ee66530e679751e55198376b8fe08371c Mon Sep 17 00:00:00 2001 From: PgBiel <9021226+PgBiel@users.noreply.github.com> Date: Sun, 6 Apr 2025 14:01:25 -0300 Subject: [PATCH] fix consecutive header row check check if there is another header at the end, not if at the next row --- crates/typst-layout/src/grid/layouter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-layout/src/grid/layouter.rs b/crates/typst-layout/src/grid/layouter.rs index 6bdeb90ac..08c44f3a2 100644 --- a/crates/typst-layout/src/grid/layouter.rs +++ b/crates/typst-layout/src/grid/layouter.rs @@ -221,7 +221,7 @@ impl<'a> GridLayouter<'a> { if self.upcoming_headers.get(consecutive_header_count).is_none_or( |h| { - h.unwrap().start > y + 1 + h.unwrap().start > first_header.unwrap().end || h.unwrap().level <= first_header.unwrap().level }, ) {