Skip to content

Commit

Permalink
Don’t call process_whitespace twice on many children
Browse files Browse the repository at this point in the history
We still have the problem with inline boxes.
  • Loading branch information
liZe committed Sep 30, 2022
1 parent 498d3e1 commit 75e17bf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions weasyprint/formatting_structure/build.py
Expand Up @@ -1239,10 +1239,8 @@ def process_whitespace(box, following_collapsible_space=False):
if isinstance(child, (boxes.TextBox, boxes.InlineBox)):
following_collapsible_space = process_whitespace(
child, following_collapsible_space)
else:
process_whitespace(child)
if child.is_in_normal_flow():
following_collapsible_space = False
elif child.is_in_normal_flow():
following_collapsible_space = False

return following_collapsible_space

Expand Down

0 comments on commit 75e17bf

Please sign in to comment.