mirror of
https://github.com/typst/typst
synced 2025-07-27 14:27:56 +08:00
fix: bug due to table cell start tags in grid layout code
This commit is contained in:
parent
3404fecd36
commit
773efb5572
@ -1284,10 +1284,18 @@ impl<'a> GridLayouter<'a> {
|
||||
if let Some([first, rest @ ..]) =
|
||||
frames.get(measurement_data.frames_in_previous_regions..)
|
||||
{
|
||||
// HACK: reconsider if this is the right decision
|
||||
fn is_empty_frame(frame: &Frame) -> bool {
|
||||
!frame.items().any(|(_, item)| match item {
|
||||
FrameItem::Group(group) => is_empty_frame(&group.frame),
|
||||
FrameItem::Tag(_) => false,
|
||||
_ => true,
|
||||
})
|
||||
}
|
||||
if can_skip
|
||||
&& breakable
|
||||
&& first.is_empty()
|
||||
&& rest.iter().any(|frame| !frame.is_empty())
|
||||
&& is_empty_frame(first)
|
||||
&& rest.iter().any(|frame| !is_empty_frame(frame))
|
||||
{
|
||||
return Ok(None);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user