mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
parent
87ee97ae5e
commit
f90fcd664b
@ -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.
|
||||
|
BIN
tests/ref/bugs/place-pagebreak.png
Normal file
BIN
tests/ref/bugs/place-pagebreak.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 978 B |
7
tests/typ/bugs/place-pagebreak.typ
Normal file
7
tests/typ/bugs/place-pagebreak.typ
Normal file
@ -0,0 +1,7 @@
|
||||
// Test placing on an already full page.
|
||||
// It shouldn't result in a page break.
|
||||
|
||||
---
|
||||
#set page(height: 40pt)
|
||||
#block(height: 100%)
|
||||
#place(bottom + right)[Hello world]
|
Loading…
x
Reference in New Issue
Block a user