summaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-06-08 12:24:47 +0200
committerLaurenz <laurmaedje@gmail.com>2023-06-08 12:24:47 +0200
commit2b812259c2ce5fdeac20a04a9aeb0b97800df90a (patch)
treeecb096b0a4a604bab9faa5e68e4049ad1e96b46f /library
parenta1b0a418837dd5fc017e98e2c9cc200a87c11e2d (diff)
Fix footnote in columns
Fixes #1433
Diffstat (limited to 'library')
-rw-r--r--library/src/layout/flow.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/library/src/layout/flow.rs b/library/src/layout/flow.rs
index 3e524c11..8c92d4b6 100644
--- a/library/src/layout/flow.rs
+++ b/library/src/layout/flow.rs
@@ -285,12 +285,16 @@ impl<'a> FlowLayouter<'a> {
}
.resolve(styles);
- let is_columns = block.is::<ColumnsElem>();
+ // Temporarily delegerate rootness to the columns.
+ let is_root = self.root;
+ if is_root && block.is::<ColumnsElem>() {
+ self.root = false;
+ self.regions.root = true;
+ }
// Layout the block itself.
let sticky = BlockElem::sticky_in(styles);
let fragment = block.layout(vt, styles, self.regions)?;
- self.regions.root = self.root && is_columns;
for (i, frame) in fragment.into_iter().enumerate() {
if i > 0
@@ -305,6 +309,7 @@ impl<'a> FlowLayouter<'a> {
)?;
}
+ self.root = is_root;
self.regions.root = false;
self.last_was_par = false;