From 46cb1c2b00c33a08805335657cf89c13b93c1a90 Mon Sep 17 00:00:00 2001
From: David Huggins-Daines <dhd@ecolingui.ca>
Date: Sat, 17 Aug 2024 17:49:25 -0400
Subject: [PATCH] fix: avoid making a placeholder for a placeholder

---
 weasyprint/layout/flex.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/weasyprint/layout/flex.py b/weasyprint/layout/flex.py
index 3455c5026..7a54f9294 100644
--- a/weasyprint/layout/flex.py
+++ b/weasyprint/layout/flex.py
@@ -113,7 +113,8 @@ def flex_layout(context, box, bottom_space, skip_stack, containing_block,
     children = box.children
     for index, child in enumerate(children):
         # Absolute child layout: create placeholder.
-        if child.is_absolutely_positioned():
+        if (child.is_absolutely_positioned()
+            and not isinstance(child, AbsolutePlaceholder)):
             child.position_x = box.content_box_x()
             child.position_y = box.content_box_y()
             new_child = placeholder = AbsolutePlaceholder(child)