diff --git a/src/reader.rs b/src/reader.rs index 3b086a7..48f7afb 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -181,7 +181,7 @@ pub fn recalculate_pages( current_height += needed; } - if block.heading_level >= 1 && i + 1 < section.blocks.len() { + if block.heading_level == 1 && i + 1 < section.blocks.len() { page_block_ranges.push((page_start_block, i + 1)); page_start_block = i + 1; current_height = 0.0;