Skip to content

Commit

Permalink
Merge branch '62.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Jun 11, 2024
2 parents 6e93e95 + 4c81663 commit 8f57a3f
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
51 changes: 51 additions & 0 deletions tests/draw/test_footnote.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,57 @@ def test_footnote_margin(assert_pixels):
<div>abc<span>d</span></div>''')


@assert_no_logs
def test_footnote_multiple_margin(assert_pixels):
assert_pixels('''
RRRR___
RRRR___
RRRR___
RRRR___
RRRR___
RRRR___
RRRRRR_
RRRRRR_
_______
_______
RRRR___
RRRR___
_______
_______
_______
_______
RRRRRR_
RRRRRR_
RRRRRR_
RRRRRR_
''', '''
<style>
@font-face {src: url(weasyprint.otf); font-family: weasyprint}
@page {
size: 7px 10px;
@footnote {
margin-top: 1px;
}
}
div {
color: red;
font-family: weasyprint;
font-size: 2px;
line-height: 1;
}
span {
float: footnote;
}
</style>
<div>ab</div>
<div>ab</div>
<div>ab</div>
<div>a<span>d</span><span>e</span></div>
<div>ab</div>''')


@assert_no_logs
def test_footnote_with_absolute(assert_pixels):
assert_pixels('''
Expand Down
2 changes: 2 additions & 0 deletions weasyprint/layout/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,4 +379,6 @@ def _update_footnote_area(self):
return overflow
else:
self.current_footnote_area.height = 0
if not self.in_column:
self.page_bottom -= self.current_footnote_area.margin_height()
return False

0 comments on commit 8f57a3f

Please sign in to comment.