Keep in-text floats in the body flow

This commit is contained in:
gloamxun committed 2026-10-21 12:55:42 +08:00
1 parent 830e1f851b
commit d2df1907be
4 files changed
+235 -20

No files matched your search

+5
View File
@@ -455,6 +455,11 @@ impl Page {
list.items.extend(nested.items);
y += halign.height;
}
VerticalItem::Float(float) if float.placement == FloatPlacement::Here => {
y += float.gap_before;
Self::paint_float(float, 0, y, &mut list);
y += float.height + float.gap_after;
}
VerticalItem::Penalty(_) | VerticalItem::Mark(_) | VerticalItem::Float(_) => {}
VerticalItem::Insertion(insertion) => {
y += insertion.height;