From b45b77b74a27a2346cdf595d5eded153763c77f0 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Sat, 25 May 2024 08:24:06 +0200 Subject: [PATCH] Fix placeholder removal --- weasyprint/layout/block.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weasyprint/layout/block.py b/weasyprint/layout/block.py index 16ed2efa5..86f45ddf7 100644 --- a/weasyprint/layout/block.py +++ b/weasyprint/layout/block.py @@ -767,7 +767,8 @@ def block_container_layout(context, box, bottom_space, skip_stack, if (box_is_fragmented and avoid_page_break(box.style['break_inside'], context) and not page_is_empty): - remove_placeholders(context, box.children[skip:], absolute_boxes, fixed_boxes) + remove_placeholders( + context, [*new_children, *box.children[skip:]], absolute_boxes, fixed_boxes) return None, None, {'break': 'any', 'page': None}, [], False, max_lines for key, value in broken_out_of_flow.items():