Skip to content

Using page() with first-level heading results in an empty page #17

@talal

Description

@talal

If you insert a page manually using the built-in page function and that page has a first-level heading inside of it then that will result in an empty page which appears before the manually inserted page.

This is because page() always inserts a manual page break and since we also use pagebreak(weak: true) before first-level headings therefore this results in two page breaks which consequently results in an unintended empty page.

To reproduce, use the following snippet:

#page[
= First level heading
#lorem(50)
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions