Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: more robustly handle unlayout'ing a footnote #1570

Merged
merged 1 commit into from
Feb 26, 2022

Conversation

aschmitz
Copy link
Contributor

This fixes a bug accidentally introduced in #1566, where we would try to unlayout a footnote that had not yet been laid out, if the algorithm decided that there would be insufficient space on a page before laying out a further footnote.

(The fix is to check to see whether we've actually laid it out yet - or, equivalently, put things back as if we haven't. Otherwise we get a ValueError from trying to remove from self.reported_footnotes and a duplicated entry in self.footnotes.)

This fixes a bug accidentally introduced in Kozea#1566, where we would try to
unlayout a footnote that had not yet been laid out, if the algorithm
decided that there would be insufficient space on a page before laying
out a further footnote.
@liZe
Copy link
Member

liZe commented Feb 26, 2022

Thank you!

@liZe liZe merged commit a969ec1 into Kozea:master Feb 26, 2022
@liZe liZe added the bug Existing features not working as expected label Feb 26, 2022
@liZe liZe added this to the 55.0 milestone Feb 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants