mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-10-03 23:48:07 +03:00
Fix more tests for footnotes
This commit is contained in:
parent
a702292a1a
commit
ed0916d55c
@ -195,7 +195,6 @@ def test_several_footnote():
|
||||
assert footnote_textbox2.text == 'mn'
|
||||
|
||||
|
||||
@pytest.mark.xfail
|
||||
@assert_no_logs
|
||||
def test_reported_footnote_1():
|
||||
page1, page2, = render_pages('''
|
||||
@ -330,7 +329,6 @@ def test_footnote_display_inline():
|
||||
assert footnote_textbox2.text == 'i'
|
||||
|
||||
|
||||
@pytest.mark.xfail
|
||||
@assert_no_logs
|
||||
def test_footnote_longer_than_space_left():
|
||||
page1, page2 = render_pages('''
|
||||
|
@ -332,7 +332,6 @@ def _linebox_layout(context, box, index, child, new_children, page_is_empty,
|
||||
context.layout_footnote(descendant.footnote)
|
||||
if new_position_y > context.page_bottom - bottom_space:
|
||||
context.report_footnote(descendant.footnote)
|
||||
stop = True
|
||||
|
||||
new_children.append(line)
|
||||
position_y = new_position_y
|
||||
|
@ -746,8 +746,10 @@ def remake_page(index, context, root_box, html):
|
||||
next_page_side = 'right' if direction_ltr ^ break_verso else 'left'
|
||||
else:
|
||||
next_page_side = None
|
||||
blank = ((next_page_side == 'left' and right_page) or
|
||||
(next_page_side == 'right' and not right_page))
|
||||
blank = bool(
|
||||
(next_page_side == 'left' and right_page) or
|
||||
(next_page_side == 'right' and not right_page) or
|
||||
(context.reported_footnotes and initial_resume_at is None))
|
||||
if blank:
|
||||
next_page_name = ''
|
||||
side = 'right' if right_page else 'left'
|
||||
@ -832,7 +834,7 @@ def make_all_pages(context, root_box, html, pages):
|
||||
yield pages[i]
|
||||
|
||||
i += 1
|
||||
if resume_at is None:
|
||||
if resume_at is None and not context.reported_footnotes:
|
||||
# Throw away obsolete pages
|
||||
context.page_maker = context.page_maker[:i + 1]
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user