mirror of
https://github.com/typst/typst
synced 2025-07-27 06:17:53 +08:00
Add test for location of migrated block
Previously, this would result in a position on the first page.
This commit is contained in:
parent
811996eb70
commit
bef4e20434
BIN
tests/ref/locate-migrated-breakable.png
Normal file
BIN
tests/ref/locate-migrated-breakable.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 243 B |
@ -72,6 +72,18 @@ B
|
||||
#pagebreak(weak: true)
|
||||
#metadata(none) <e>
|
||||
|
||||
--- locate-migrated-breakable ---
|
||||
// Ensure that when a breakable element fully migrates to the next page without
|
||||
// orphan frames, its position correctly reflects that.
|
||||
#set page(height: 40pt)
|
||||
A
|
||||
#block[B]<a>
|
||||
|
||||
#context test(
|
||||
locate(<a>).position(),
|
||||
(page: 2, x: 10pt, y: 10pt),
|
||||
)
|
||||
|
||||
--- issue-4029-locate-after-spacing ---
|
||||
#set page(margin: 10pt)
|
||||
#show heading: it => v(40pt) + it
|
||||
|
Loading…
x
Reference in New Issue
Block a user