diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-05-30 14:36:34 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-05-30 14:36:34 +0200 |
| commit | f90fcd664bd64e4c7fd996e8d0825e7031625763 (patch) | |
| tree | 68a6885cb77607036fe9ed22eee019211f987fe3 /library/src | |
| parent | 87ee97ae5e4f557034bad98e5aec770f5c5a0f35 (diff) | |
Fix pagebreak before `place`
Fixes #1368
Diffstat (limited to 'library/src')
| -rw-r--r-- | library/src/layout/flow.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/library/src/layout/flow.rs b/library/src/layout/flow.rs index 69807320..cd713c68 100644 --- a/library/src/layout/flow.rs +++ b/library/src/layout/flow.rs @@ -243,11 +243,6 @@ impl<'a> FlowLayouter<'a> { block: &Content, styles: StyleChain, ) -> SourceResult<()> { - // Skip directly if region is already full. - if self.regions.is_full() { - self.finish_region()?; - } - // Placed elements that are out of flow produce placed items which // aren't aligned later. if let Some(placed) = block.to::<PlaceElem>() { @@ -256,6 +251,9 @@ impl<'a> FlowLayouter<'a> { self.layout_item(vt, FlowItem::Placed(frame))?; return Ok(()); } + } else if self.regions.is_full() { + // Skip directly if region is already full. + self.finish_region()?; } // How to align the block. |
