Skip to content

Commit 75e17bf

Browse files
committed
Don’t call process_whitespace twice on many children
We still have the problem with inline boxes.
1 parent 498d3e1 commit 75e17bf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

weasyprint/formatting_structure/build.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1239,10 +1239,8 @@ def process_whitespace(box, following_collapsible_space=False):
12391239
if isinstance(child, (boxes.TextBox, boxes.InlineBox)):
12401240
following_collapsible_space = process_whitespace(
12411241
child, following_collapsible_space)
1242-
else:
1243-
process_whitespace(child)
1244-
if child.is_in_normal_flow():
1245-
following_collapsible_space = False
1242+
elif child.is_in_normal_flow():
1243+
following_collapsible_space = False
12461244

12471245
return following_collapsible_space
12481246

0 commit comments

Comments
 (0)