fix: only h1 headings force page break, not all heading levels

This commit is contained in:
Developer
2026-05-23 18:03:52 +08:00
parent 11385a68dc
commit 0b076a8c26

View File

@@ -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;