fix: TOC navigation and pagination improvements
- Fix recalculate_pages missing heading_top_spacing in page height calculation - Improve build_toc path matching: extract filename first, fall back to substring - Filter out EPUB3 nav.xhtml from content sections - Skip Windows resource compilation when windres is not available - Add unit tests for TOC filename matching and nav filtering
This commit is contained in:
@@ -151,7 +151,11 @@ pub fn recalculate_pages(
|
||||
let block_height = measure_block_height(ctx, &display_text, block_font_size, available_width);
|
||||
|
||||
let spacing = if i > page_start_block && i > 0 {
|
||||
para_spacing
|
||||
if block.heading_level > 0 {
|
||||
para_spacing + heading_top_spacing(para_spacing, block.heading_level)
|
||||
} else {
|
||||
para_spacing
|
||||
}
|
||||
} else {
|
||||
0.0
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user