Skip to content

Fill/stroke skipping for empty parts of a breakable blocks fails with nested block #2914

@Narukara

Description

@Narukara

Description

I want to put some code in a block with background color. But I found that sometimes, at the end of a page, there would be a block with color but no content. It looks weird. I'm not sure if this is a bug, but blocks containing normal text don't seem to cause this problem.

A example:

#show raw.where(block: true): it => [
  #block(fill: luma(230), inset: 10pt, width: 100%)[
    #it
  ]
]

#lorem(630)

```rust
fn main() {
    println!("Hello, world!");
}
```

图片

typst version: 0.10.0 (70ca0d2)

Reproduction URL

No response

Operating system

Linux

Typst version

  • I am using the latest version of Typst

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglayoutRelated to layout, positioning, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions