Skip to content

Commit

Permalink
Fix table overflow edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kesara committed Dec 10, 2024
1 parent 003ff42 commit 910efca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions weasyprint/layout/preferred.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from math import inf

from ..formatting_structure import boxes
from ..text.line_break import split_first_line
from ..text.line_break import split_first_line, get_log_attrs
from .replaced import default_image_sizing


Expand Down Expand Up @@ -314,7 +314,8 @@ def inline_line_widths(context, box, outer, is_line_start, minimum, skip_stack=N
child_text = child.text.encode()[(skip or 0):]
if is_line_start and space_collapse:
child_text = child_text.lstrip(b' ')
if minimum and child_text == b' ':
_, log_attrs = get_log_attrs(child_text.strip(b' ').decode(), child.style['lang'])
if minimum and (child_text == b' ' or (len(child_text.strip(b' ')) == 1 and log_attrs[0].is_word_boundary)):
lines = [0, 0]
else:
max_width = 0 if minimum else None
Expand Down

0 comments on commit 910efca

Please sign in to comment.