feat: force page break after heading blocks for clean chapter layout
This commit is contained in:
@@ -180,6 +180,12 @@ pub fn recalculate_pages(
|
||||
} else {
|
||||
current_height += needed;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
if page_start_block < section.blocks.len() {
|
||||
|
||||
Reference in New Issue
Block a user